Environment
Stidner Partner API has one environment and two modes - live and sandbox. The mode the request is being performed in depends on the key (live/sandbox) you are using to authenticate request.
- Url: https://shipping-api.stidner.com
To start working with Stidner Partner API, you need to obtain partner credentials. If your partner account is authorised to work with API, you will be able to get the credentials on settings page at partner dashboard partner.stidner.com.
If you are not authorised to work with API, please, contact us, and we will figure out the best way, that meets your needs.
Stidner Partner API has one environment and two modes - live and sandbox. The mode the request is being performed in depends on the key (live/sandbox) you are using to authenticate request.
All endpoints in Stidner Partner API require authentication. Credentials consist of partner handle and API Key: sandbox key starts with sp_sandbox_ prefix, live key starts with sp_live_ prefix.
The above credentials should be used to sign requests to every endpoint, provided as Basic HTTP-auth login and password.
Example of authenticated request:
curl -X POST \
https://shipping-api.stidner.com/api/v1/order \
-H 'authorization: Basic MTo4YWI4MmM1MC01ZDdiLTExZTctYjJlNS0zNzhhODI1MWUxMzg=' \
-d '{ … }'
To make Sandbox mode requests, you need to specify test API Key instead of live one when making requests.
As a result all the merchants, that you create in Sandbox mode will be the part of our Sandbox environment and will not be accessable in live mode (for the requests with live API key).
POST /api/v1/partner/merchant
Signs up new Merchant in connection to authenticated Partner. Returned is Merchant object with credentials, that can be used in communicating with Stidner Shipping API.
Attribute | Type | Description | |
---|---|---|---|
identifier |
|
R | Merchant's identity number - organisation number for business customer or social security number for individual customer. Should have the format of 10 or 12 digits with valid checksum. |
contact_info |
|
O |
ContactInfo JSON object. This contact information will be used for shipment - displayed on the labels, included in EDIs and API requests to carriers.
It is optional on signup, you will be able to add/update it any time using Partner API or Shipping API. This contact information will be applied to every Address object, that Merchant has. Currently we don't support having different contact information on different Addresses. |
addresses |
|
O |
Array of Address JSON objects. You can provide sender and return addresses in case if they differ from the oficially registered address of Merchant.
The addresses are optional, you will be able to add/update/remove them any time using Partner API or Shipping API. |
Attribute | Type | Description | |
---|---|---|---|
name |
|
O | Name of contact person. Used for communications with carrier. We don't recommend to specify company legal name here - use person's name instead. It will make the pickup/return process for carrier a lot easier. |
|
O | Email for notifications from carriers regarding shipments. | |
phone |
|
O |
Phone for notifications from carriers regarding shipments. Despite that it is optional on signup, a lot of carriers actually require it, and some of the carriers require, that the phone should be strictly mobile.
We recommend to always set up the valid mobile phone number of contact person here. |
Attribute | Type | Description | |
---|---|---|---|
country_code |
|
R | |
postal_code |
|
R | |
city |
|
R | |
address_line |
|
R | |
address_line_2 |
|
O |
Important notes:
{
"identifier": "333333333333",
"contact_info": {
"name": "Anton Vorozheev",
"email": "anton@stidner.com",
"phone": "+79119590589"
},
"addresses": [
{
"type": "sender",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"address_line": "Fontanka 77, 25",
"address_line_2": null
},
{
"type": "return",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"address_line": "Fontanka 77, 25",
"address_line_2": null
}
]
}
{
"data": {
"id": 1,
"name": "Stidner Complete AB",
"type": "AB",
"organisation_number": "333333333333",
"vat_number": "SE333333333333",
"api_key_live": "8ab82c50-5d7b-11e7-b2e5-378a8251e138",
"api_key_sandbox": "ef0v4p1a-239k-29oz-9dbf-51d53ef62466",
"active": true,
"addresses": [
{
"customer_type": "business",
"type": "sender",
"name": "Stidner Complete AB",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"region": null,
"address_line": "Fontanka 77, 25",
"address_line_2": null,
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
},
{
"customer_type": "business",
"type": "return",
"name": "Stidner Complete AB",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"region": null,
"address_line": "Fontanka 77, 25",
"address_line_2": null,
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
}
],
"created_at": "2017-06-30 10:04:44"
}
}
GET /api/v1/partner/merchant/{merchant_id}
Gets information about Merchant with specified id. Error is returned when Merchant with specified id is not found or does not belong to the authenticated Partner.
{
"data": {
"id": 1,
"name": "Stidner Complete AB",
"type": "AB",
"organisation_number": "333333333333",
"vat_number": "SE333333333333",
"api_key_live": "8ab82c50-5d7b-11e7-b2e5-378a8251e138",
"api_key_sandbox": "ef0v4p1a-239k-29oz-9dbf-51d53ef62466",
"active": true,
"addresses": [
{
"customer_type": "business",
"type": "sender",
"name": "Stidner Complete AB",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"region": null,
"address_line": "Fontanka 77, 25",
"address_line_2": null,
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
},
{
"customer_type": "business",
"type": "return",
"name": "Stidner Complete AB",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"region": null,
"address_line": "Fontanka 77, 25",
"address_line_2": null,
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
}
],
"created_at": "2017-06-30 10:04:44"
}
}
PUT /api/v1/partner/merchant/{merchant_id}
Updates information about Merchant with specified id. Error is returned when Merchant with specified id is not found or does not belong to the authenticated Partner.
{
"addresses": [
{
"customer_type": "business",
"type": "sender",
"name": "Stidner Complete AB",
"country_code": "BY",
"postal_code": "210001",
"city": "Malmo",
"address_line": "Fontanka 77, 25",
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
},
{
"customer_type": "business",
"type": "return",
"name": "Stidner Complete AB",
"country_code": "PL",
"postal_code": "191023",
"city": "St. Petersburg",
"address_line": "Fontanka 77, 25",
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
}
]
}
{
"data": {
"id": 1,
"name": "Stidner Complete AB",
"type": "AB",
"organisation_number": "333333333333",
"vat_number": "SE333333333333",
"api_key_live": "8ab82c50-5d7b-11e7-b2e5-378a8251e138",
"api_key_sandbox": "ef0v4p1a-239k-29oz-9dbf-51d53ef62466",
"active": true,
"addresses": [
{
"customer_type": "business",
"type": "sender",
"name": "Stidner Complete AB",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"region": null,
"address_line": "Fontanka 77, 25",
"address_line_2": null,
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
},
{
"customer_type": "business",
"type": "return",
"name": "Stidner Complete AB",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"region": null,
"address_line": "Fontanka 77, 25",
"address_line_2": null,
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
}
],
"created_at": "2017-06-30 10:04:44"
}
}
POST /api/v1/partner/merchant/get
Gets paginated list of all Merchants, that belong to authenticated Partner.
{
"data": [
{
"id": 1,
"name": "Stidner Complete AB",
"type": "AB",
"organisation_number": "333333333333",
"vat_number": "SE333333333333",
"api_key_live": "8ab82c50-5d7b-11e7-b2e5-378a8251e138",
"api_key_sandbox": "ef0v4p1a-239k-29oz-9dbf-51d53ef62466",
"active": true,
"addresses": [
{
"customer_type": "business",
"type": "sender",
"name": "Stidner Complete AB",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"region": null,
"address_line": "Fontanka 77, 25",
"address_line_2": null,
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
},
{
"customer_type": "business",
"type": "return",
"name": "Stidner Complete AB",
"country_code": "SE",
"postal_code": "191023",
"city": "St. Petersburg",
"region": null,
"address_line": "Fontanka 77, 25",
"address_line_2": null,
"contact_name": "Anton Vorozheev",
"contact_phone": "+79119590589",
"contact_email": "mail@stidner.com"
}
],
"created_at": "2017-06-30 10:04:44"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 1,
"per_page": 1,
"current_page": 1,
"total_pages": 2,
"links": {
"next": "https://shipping-api.stidner.com/api/v1/partner/merchant/get?page=2"
}
}
}
}