Origin Schedule Configuration API
Learn how to use the Origin Schedule Configuration API to modify critical components of your network origin schedule configurations.
About the Origin Schedule Configuration API
The Origin Schedule Configuration API enables you to programmatically add, remove, and make modifications to the configuration of your organization's network origin schedules (i.e., schedules of your fulfillment centers, warehouses) from your applications instead of making them through the Shipium Console. This may be particularly useful if your organization already has systems for modifying some of these settings within your own systems and wants them quickly reflected within your Shipium applications as well.
Warning: potential negative impact on your fulfillment operations
This API can modify elements of your organization's network fulfillment configuration in ways that could negatively impact the production of your fulfillment operations. You should only use the API if you are familiar with how any changes you make could affect your network fulfillment configuration.
REST semantics
Shipium application programming interfaces (APIs) generally adhere to the basic REST semantics for hypertext transfer protocol, or HTTP:
- POST - create a new origin schedule entry
- GET - retrieve the latest version of a given origin schedule entry by ID
- DELETE - remove an existing origin schedule entry
Standard basics for using the Shipium APIs
Authentication for API calls
In the cURL examples on this page, the environment variable
AUTHSTRING
is used to handle authorization. The recipe below shows how to set it correctly for both API Key and OAuth users.
How to use test mode
Want to run some examples and not charge any real money against your account?
You can add "testMode": "true" to a call, and it will be evaluated for correctness but not applied. You can use this for validating that your calls work without making actual changes.
The examples below all contain the
testMode
flag to err on the side of caution – you should remove this to make production calls.
About origin schedules
An origin schedule is a schedule associated with a given origin, including shipping days of the week, processing times, shipping speeds, and holidays. These parameters impact how various Shipium applications and APIs operate, including Carrier and Method Selection and Delivery Experience Flow.
Using the Origin Schedule Configuration API
This section includes guidance on using the Origin Schedule Configuration API to:
- create a new origin schedule entry;
- retrieve the latest version of a given origin schedule entry by ID; and
- delete an existing origin schedule entry.
Creating an origin schedule entry (POST)
Pathways and parameters | Details |
---|---|
POST | <<api_url>>/api/v1/partnerConfiguration/origins/{originId}/schedule/entry |
Required path element | originID (a string ID for the origin with which this schedule entry is to be associated at creation) |
This example shows the Client Uniform Resource Locator (cURL) request for creating an origin schedule:
curl --request POST \
--url <<api_url>>/api/v1/partnerConfiguration/origins/{originId}/schedule/entry \
--header 'accept: application/json' \
--header $AUTHSTRING \
--header 'content-type: application/json' \
--data 'INSERT CONTENTS FROM BELOW'
This example shows the JavaScript Object Notation (JSON) for the body contents (passed via --data
in cURL):
{
"carrierSchedules": [
{
"carrierId": "string",
"carrierScheduleId": "string",
"carrierServiceMethodIds": [
"string"
],
"cutoffExceptions": [
{
"cutoff": "15:30",
"date": "2022-12-24"
}
],
"cutoffTimes": [
{
"cutoff": "13:45",
"dayOfWeek": "FRIDAY"
}
]
}
],
"from": "2023-05-23T19:51:31.175Z",
"holidays": [
{
"date": "2020-07-04",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
],
"processingCutoff": {
"expectedDaysToShip": 0,
"shippingCutoffHour": 0,
"weekendCutoffHour": 0
},
"shippingDays": [
"FRIDAY"
],
"to": "2023-05-23T19:51:31.175Z"
}
This example shows a JSON response:
{
"carrierSchedules": [
{
"carrierId": "string",
"carrierScheduleId": "string",
"carrierServiceMethodIds": [
"string"
],
"cutoffExceptions": [
{
"cutoff": "15:30",
"date": "2022-12-24"
}
],
"cutoffTimes": [
{
"cutoff": "13:45",
"dayOfWeek": "FRIDAY"
}
]
}
],
"from": "2023-05-23T20:07:04.353Z",
"holidays": [
{
"date": "2020-07-04",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
],
"orchestratedAssetMetadata": {
"orchestrationId": "string",
"orchestrationTimeStamp": "2023-05-23T20:07:04.353Z"
},
"processingCutoff": {
"expectedDaysToShip": 0,
"shippingCutoffHour": 0,
"weekendCutoffHour": 0
},
"scheduleEntryId": "string",
"shippingDays": [
"FRIDAY"
],
"to": "2023-05-23T20:07:04.353Z"
}
Retrieving all origin schedules for an origin (GET)
Pathways and parameters | Details |
---|---|
GET | <<api_url>>/api/v1/partnerConfiguration/origins/{originId}/schedule |
Required path element | originID (a string ID for the origin with which this schedule entry is associated) |
The request body is empty for this call.
This example shows a JSON response:
{
"orchestratedAssetMetadata": {
"orchestrationId": "string",
"orchestrationTimeStamp": "2023-05-23T20:10:39.342Z"
},
"results": [
{
"carrierSchedules": [
{
"carrierId": "string",
"carrierScheduleId": "string",
"carrierServiceMethodIds": [
"string"
],
"cutoffExceptions": [
{
"cutoff": "15:30",
"date": "2022-12-24"
}
],
"cutoffTimes": [
{
"cutoff": "13:45",
"dayOfWeek": "FRIDAY"
}
]
}
],
"from": "2023-05-23T20:10:39.342Z",
"holidays": [
{
"date": "2020-07-04",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
],
"orchestratedAssetMetadata": {
"orchestrationId": "string",
"orchestrationTimeStamp": "2023-05-23T20:10:39.342Z"
},
"processingCutoff": {
"expectedDaysToShip": 0,
"shippingCutoffHour": 0,
"weekendCutoffHour": 0
},
"scheduleEntryId": "string",
"shippingDays": [
"FRIDAY"
],
"to": "2023-05-23T20:10:39.342Z"
}
]
}
Deleting an origin schedule entry by schedule entry ID (DELETE)
Pathways and parameters | Details |
---|---|
DELETE | <<api_url>>/api/v1/partnerConfiguration/origins/{originId}/schedule/entry/{originScheduleEntryId} |
Required path element | originId (a string ID for the origin with which this schedule entry is associated) |
Required path element | originScheduleEntryId (a string ID for the origin schedule entry with which this |
The request body is empty for this call.
This example shows a JSON response:
{
"carrierSchedules": [
{
"carrierId": "string",
"carrierScheduleId": "string",
"carrierServiceMethodIds": [
"string"
],
"cutoffExceptions": [
{
"cutoff": "15:30",
"date": "2022-12-24"
}
],
"cutoffTimes": [
{
"cutoff": "13:45",
"dayOfWeek": "FRIDAY"
}
]
}
],
"from": "2023-05-23T20:13:58.563Z",
"holidays": [
{
"date": "2020-07-04",
"metadata": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
],
"orchestratedAssetMetadata": {
"orchestrationId": "string",
"orchestrationTimeStamp": "2023-05-23T20:13:58.563Z"
},
"processingCutoff": {
"expectedDaysToShip": 0,
"shippingCutoffHour": 0,
"weekendCutoffHour": 0
},
"scheduleEntryId": "string",
"shippingDays": [
"FRIDAY"
],
"to": "2023-05-23T20:13:58.563Z"
}
Updating origin schedules
Making updates to an existing origin schedule is currently managed by deleting the existing origin schedule and creating a new origin schedule.
Updated 4 months ago