Calls to the API must be for genuine use and responses from the API must not be stored for the purpose of creating an offline copy of the information stored. Failure to comply with this requirement will infringe the API License.
Store API Calls
Register Store
POST /organisation/store
Purpose
To register a store as having a relationship with an organisation. The organisation must already be registered on your account.
Inputs
- legalname - OPTIONAL - The store's legal name (will be assumed to be as the parent organisation but in the case of franchise stores for example, the store may be a different legal entity to the parent organisation).
- reportname - Used to identify the store on any reports we generate for you.
- type - The type of store. Valid values are "Pawn" or "2ndHand".
- address1 - The store's postal address line 1.
- address2 - The store's postal address line 2.
- address3 - The store's postal address line 3.
- address4 - The store's postal address line 4.
- city - The store's postal city.
- county - OPTIONAL - The store's postal county. Optional if the city is not part of a county. For Example, an address in Washington DC will not have a county.
- state - The store's postal state.
- zipcode - The store's zip/post code.
- country - The store's country.
- parentorgid - The store's parent orgid. This must be a valid ID of an organisation already registed to you. This enables any of your clients company structures to be represented so that they can be broken down for reporting purposes if desired.
The store's full postal address is required in order that the licensing conditions can be retrieved.
Example Request
POST /organisation/store HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"legalname": "Amce Traders Inc.",
"reportname": "Amce Traders",
"type": "2ndHand",
"address1": "-",
"address2": "-",
"address3": "-",
"address4": "-",
"city": "-",
"county": "-",
"state": "-",
"zipcode": "-",
"country": "-",
"parentorgid": 123
}
Output
A unique store ID. You will need this ID whenever you submit a transaction or are retrieving compliance requirments for the store. In the event of an error the storeid will not be returned. Instead, a JSON object containing an errors array will be returned. For details on the errors array please read the Errors page.
Example Responses
Response on Success:HTTP/1.1 201 Created Content-Type: application/json { "storeid": 456 }
Response on Error:HTTP/1.1 400 Human readable error message Content-Type: application/json { "errors": [ { "id": n, "message": "Human readable message" } ] }
Get Store Fields
POST /store/{partnerid}/{storeid}
Purpose
To return a list of various field values that are set for the specified store.
Inputs
- partner - The ID of the partner you want store fields values for.
- storeid - The ID of the partner store ID you want fields values for.
Example Request
curl -H 'Accept: application/json' \
-u 123:XXXXXXXXXXXXXXXXXXXXXX \
https://gapi.checkmend.com/store/1/1
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"partner": "1",
"teststore": "0",
"legalname": "Testing Store",
"reportname": "Testing Store",
"type": "2ndHand",
"parentorgid": "1"
}