question

tester-manish-b avatar image
tester-manish-b asked Jacob Abrams commented

Get Order type object by ID

@ Clover team,

I have Order type Id which is from calling orderlist api. Now I want to get the ordertype object by this id for showing type information.

Any help will be appreciable. Thanks in advance.

Thank you, Manish

Orders
2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

I'm not clear on what API functions you are using, is this a web app or an android app? Can you provide some code snippets to show what you are currently doing?

0 Likes 0 ·
tester-manish-b avatar image tester-manish-b commented ·

I am calling web API from my Android app. Web API also created our-self which have clover provided value also our custom data. We can add another field for Ordertype Level, but I am looking for SDK function. Earlier I found that Merchant object provide order type but there doesn't have any connector for v3 merchant, v1 merchant doesn't provide ordertype. So I a looking for any other way I can achieve ordertype or need to add on API?

0 Likes 0 ·

1 Answer

Jacob Abrams avatar image
Jacob Abrams answered Jacob Abrams commented

Take a look at https://www.clover.com/api_docs#!/mer...

Here are the endpoints:

v3/merchants/{mId}/order_types -- GET
v3/merchants/{mId}/order_types -- POST
v3/merchants/{mId}/order_types/{orderTypeId} -- GET
v3/merchants/{mId}/order_types/{orderTypeId} -- PUT
v3/merchants/{mId}/order_types/{orderTypeId} -- POST
v3/merchants/{mId}/order_types/{orderTypeId} -- DELETE

Here is a description of an OrderType object:

{
    "customerIdMethod": "",
    "maxRadius": "long",
    "hours": {
      "reference": {
        "id": ""
      },
      "sunday": [
        {
          "start": "int",
          "end": "int"
        }
      ],
      "saturday": [
        {
          "start": "int",
          "end": "int"
        }
      ],
      "tuesday": [
        {
          "start": "int",
          "end": "int"
        }
      ],
      "name": "",
      "wednesday": [
        {
          "start": "int",
          "end": "int"
        }
      ],
      "thursday": [
        {
          "start": "int",
          "end": "int"
        }
      ],
      "friday": [
        {
          "start": "int",
          "end": "int"
        }
      ],
      "id": "",
      "monday": [
        {
          "start": "int",
          "end": "int"
        }
      ]
    },
    "taxable": false,
    "filterCategories": false,
    "fee": "long",
    "avgOrderTime": "long",
    "label": "",
    "systemOrderTypeId": "",
    "isHidden": false,
    "isDefault": false,
    "minOrderAmount": "long",
    "isDeleted": false,
    "hoursAvailable": "",
    "id": "",
    "maxOrderAmount": "long",
    "categories": [
      {
        "id": ""
      }
    ],
    "labelKey": ""
  }
3 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mark R avatar image Mark R commented ·

@jacobabrams Looks like the orderType end points are on merchants api call. https://www.clover.com/api_docs#!/merchants/GetOrderTypes

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

Thanks, I didn't think to look there.

0 Likes 0 ·
Mark R avatar image Mark R commented ·

No worries! You can add it to your answer. Hope it helps others too!

0 Likes 0 ·

Welcome to the
Clover Developer Community