question

ankravkk avatar image
ankravkk asked bryanvargas commented

Fields are different in response than in example

I hitting the request with https://sandbox.dev.clover.com/v3/merchants/0QMBA78PXG621?expand=shifts&return_null_fields=true in this response i am getting different fields then what is mentioned in example response .

For example :

 "partnerApp": null,
  "accountType": null,
  "bankProcessing": null,
  "merchantBoarding": null,
  "hierarchy": null,
  "selfBoardingApplication": null

But these fields are not defined in example response .

That's why i am unable to get the exact datatype and all the fields available for the API's


REST APIMerchant
10 |2000

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

1 Answer

bryanvargas avatar image
bryanvargas answered bryanvargas commented

Hey, I was able to run the API call and was able to get the full JSON output and I see those fields you mentioned above. If you are referencing the API References on Clover Docs, the example 200 response does not have any expanded fields and is just a simple call:

{
                 
"id": "string",
"name": "string",
"owner": {
                 
"id": "string",
"name": "string",
"nickname": "string",
"customId": "string",
"email": "string",
"inviteSent": true,
"claimedTime": 0,
"deletedTime": 0,
"pin": "string",
"unhashedPin": "string",
"role": "OWNER",
"roles": [
{
                 
"id": "string"
}
],
"isOwner": true,
"shifts": [
{
                 
"id": "string"
}
],
"payments": [
{
                 
"id": "string"
}
],
"orders": [
{
                 
"id": "string"
}
],
"employeeCards": [
{
                 
"id": "string"
}
],
"merchant": {
                 
"id": "string"
}
},
"address": {
                 
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"country": "string",
"phoneNumber": "string",
"state": "string",
"zip": "string"
}
}


If you need to get the employee shifts, we do have another endpoint { {baseUrl}}/v3/merchants/{mId}/shifts

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.

ankravkk avatar image ankravkk commented ·

if you pass return_null_fields=true then it will give u some more columns like

  1. "partnerApp": null,
  2. "accountType": null,
  3. "bankProcessing": null,
  4. "merchantBoarding": null,
  5. "hierarchy": null,
  6. "selfBoardingApplication": null
0 Likes 0 ·
bryanvargas avatar image bryanvargas ♦♦ ankravkk commented ·

Hey, because you are using the GET merchant endpoint, those are the available fields to that endpoint. You can see you are also able to expand those fields in our API reference: https://docs.clover.com/reference/merchantgetmerchant


Expandable fields: [employees, bankProcessing, externalMerchant, merchantBoarding, deviceBoarding, programExpress, hierarchy, shifts, orders, address, logos, owner, items, tags, tenders, payments, gateway, printers, modifierGroups, properties, tipSuggestions, openingHours, partnerApp, selfBoardingApplication, enterprises, equipment, equipmentSummary]

Is there a reason why you are using the GET merchant endpoint to get the shifts and not the { {baseUrl}}/v3/merchants/{mId}/shifts
https://docs.clover.com/reference/merchantgetallshifts


0 Likes 0 ·

Welcome to the
Clover Developer Community