Endpoints
- GET/merchantRetrieve your merchant account settings
- PATCH/merchantUpdate your merchant account settings
- GET/merchants/settings/locations/operating_hoursRetrieve your store operating hours
- PUT/merchants/settings/locations/operating_hoursReplace your store operating hours
{
"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"
}
}{
"working_days": [
{
"day": "monday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "tuesday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "wednesday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "thursday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "friday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "saturday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": false
},
{
"day": "sunday",
"beginning_of_workday": "00:00",
"end_of_workday": "17:00",
"is_open": false
}
]
}Retrieve merchant settings
GET/merchant
Returns an object representing your merchant account settings.
To perform this operation, you must be authenticated with an authentication token.
Response codes
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns an object representing your merchant account settings. |
| 403 | Forbidden | Returned when the API key doesn't match a valid merchant account, or the API secret is missing the permission this endpoint requires. |
| 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. |
{
"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"
}
}{
"error": "invalid_merchant_account",
"error_description": "An unknown error has occurred."
}Update merchant settings
PATCH/merchant
Given an object with the desired settings to update, updates the Merchant settings on Shippit.
To perform this operation, you must be authenticated with an authentication token.
The updated merchant details are returned in full.
Parameters
Wrap the fields you want to change in a merchant object.
Response codes
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | The updated merchant account. |
| 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. |
| 403 | Forbidden | Returned when the API key doesn't match a valid merchant account, or the API secret is missing the permission this endpoint requires. |
| 422 | Unprocessable Entity | Returned when a submitted value fails validation, such as an address Shippit can't save. |
| 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. |
{
"merchant": {
"store_name": "New Store Name"
}
}{
"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"
}
}{
"error": "bad_request",
"error_description": "The data given to this server does not meet our criteria."
}{
"error": "invalid_merchant_account",
"error_description": "An unknown error has occurred."
}{
"error": "system",
"error_description": "An unknown error has occurred."
}Retrieve operating hours
GET/merchants/settings/locations/operating_hours
Returns an object representing your merchant operating hours settings.
To perform this operation, you must authenticate with an authentication token.
Response codes
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns an object representing the operating hours of your store for each day of the week. |
| 403 | Forbidden | Returned when the API key doesn't match a valid merchant account, or the API secret is missing the permission this endpoint requires. |
| 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. |
{
"working_days": [
{
"day": "monday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "tuesday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "wednesday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "thursday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "friday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "saturday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": false
},
{
"day": "sunday",
"beginning_of_workday": "00:00",
"end_of_workday": "17:00",
"is_open": false
}
]
}{
"error": "invalid_merchant_account",
"error_description": "An unknown error has occurred."
}Update operating hours
PUT/merchants/settings/locations/operating_hours
Given an object with the desired settings to update, updates the merchant operating hours settings on Shippit.
To perform this operation, you must authenticate with an authentication token.
The updated operating hours are returned in full.
Parameters
Response codes
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | The updated merchant operating hours |
| 400 | Bad Request | Returned when Shippit has a problem with the input parameters. Not all input errors result in this error. Depending on the request, the system may parse the error as an unknown error or include it in the response body. If returned as text or html, it's blank. |
| 403 | Forbidden | Returned when the API key doesn't match a valid merchant account, or the API secret is missing the permission this endpoint requires. |
| 500 | Internal Server Error | Returned when Shippit can't save the operating hours, or when an unknown error occurs. Carries an errors array of strings rather than an error object. |
{
"working_days": [
{
"day": "monday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "tuesday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "wednesday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "thursday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "friday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "saturday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": false
},
{
"day": "sunday",
"beginning_of_workday": "00:00",
"end_of_workday": "17:00",
"is_open": false
}
]
}{
"working_days": [
{
"day": "monday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "tuesday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "wednesday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "thursday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "friday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": true
},
{
"day": "saturday",
"beginning_of_workday": "09:00",
"end_of_workday": "17:00",
"is_open": false
},
{
"day": "sunday",
"beginning_of_workday": "00:00",
"end_of_workday": "17:00",
"is_open": false
}
]
}{
"error": "bad_request",
"error_description": "The data given to this server does not meet our criteria."
}{
"errors": {
"working_days": "field must be provided"
}
}{
"errors": {
"monday": {
"is_open": "field must be provided"
}
}
}{
"errors": {
"end_before_beginning": "In one of the weekdays, beginning_of_workday is later than end_of_workday"
}
}{
"errors": {
"all_weekdays_present": "All weekdays must be present in the following order: monday, tuesday, wednesday, thursday, friday, saturday, sunday"
}
}{
"errors": {
"wednesday": {
"day": "must be one of the following: monday, tuesday, wednesday, thursday, friday, saturday, sunday"
}
}
}{
"errors": {
"monday": {
"beginning_of_workday": "does not have the format HH:MM"
}
}
}{
"errors": {
"monday": {
"beginning_of_workday": "must be a 30-minute increment (ending in :00 or :30)"
}
}
}{
"errors": {
"monday": {
"is_open": "is not a boolean value"
}
}
}{
"errors": {
"monday": {
"end_of_workday": "is not a string value"
}
}
}{
"error": "invalid_merchant_account",
"error_description": "An unknown error has occurred."
}