Merchant responses
The merchant settings API allows you to query the current settings for your merchant account and to make updates to this via API.
Get Merchant responses
GET /merchant
Status | Meaning | Description |
---|---|---|
200 | OK | Returns an object representing your merchant account settings. |
403 | Forbidden | Returned when the API key given does not match a valid merchant account. |
To perform this operation, you must be authenticated with an authentication token.
Examples
Example responses when getting merchant details
Successful get merchant details responses
Returns an object representing your merchant account settings:
{
"response": {
"store_name": "New Store Name",
"company_name": "Harold Pty Ltd",
"contact_name": "Robert",
"contact_phone": "0400000000",
"shipping_cart_method_name": "",
"preparation_time": 60,
"website_url": "www.haroldsharpoons.com.au",
"address_1": "110 Rex Road",
"suburb": "Sydney",
"state": "NSW",
"postcode": "2000",
"country_code": "AU"
}
}
Unsuccessful get merchant details responses
Returned when the API key given does not match a valid merchant account:
{
"error": "invalid_merchant_account",
"error_description": "An unknown error has occurred."
}
Update merchant details responses
Given an object with the desired settings to update, updates the Merchant settings on Shippit
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The updated merchant account. | MerchantResponse |
400 | Bad Request | Returned when Shippit has a problem with the input parameters. Not all input errors can result in this error. Depending on the request, the error may be parsed as an unknown error or as part of the response body. If returned as text/html, it is blank. | string |
403 | Forbidden | Returned when the API key given does not match a valid merchant account. | GenericErrorResponse |
500 | Internal Server Error | Returned when an unknown error occurs. May be returned if Shippit has trouble with the combination of the input or merchant account configuration. | GenericErrorResponse |
Examples
Example responses for updating merchant details
Successful update merchant details responses
Returns the updated merchant details:
{
"response": {
"store_name": "Harolds Harpoons",
"company_name": "Harold Pty Ltd",
"contact_name": "Robert",
"contact_phone": "0400000000",
"shipping_cart_method_name": "",
"preparation_time": 60,
"website_url": "www.haroldsharpoons.com.au",
"address_1": "110 Rex Road",
"suburb": "Sydney",
"state": "NSW",
"postcode": "2000",
"country_code": "AU"
}
}
Unsuccessful update merchant details responses
Returned when Shippit has a problem with the input parameters.
Not all input errors can result in this error. Depending on the request, the error may be parsed as an unknown error or as part of the response body.
If returned as text/html, it is blank.
{
"error": "bad_request",
"error_description": "The data given to this server does not meet our criteria."
}
400 Response:
"string"
Returned when the API key given does not match a valid merchant account:
{
"error": "invalid_merchant_account",
"error_description": "An unknown error has occurred."
}
Returned when an unknown error occurs. May be returned if Shippit has trouble with the combination of the input or merchant account configuration:
{
"error": "system",
"error_description": "An unknown error has occurred."
}