Swagger API Личный кабинет Центр поддержки

Example of getting a list of pickup points in Moscow

# GET parameters
# limit = 5
# offset = 0
# filter = providerKey=cdek;city=Москва

curl "https://api.apiship.ru/v1/lists/points?limit=5&offset=0&filter=providerKey%3Dcdek%3Bcity%3D%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0" \
     -H 'Accept: application/json' \
     -H 'Authorization: XXXXXXXX'

The responce is in the file points_response.json

An example of getting a list of available tariffs

# GET parameters
# limit = 5000
# filter = providerKey=cdek

curl "https://api.apiship.ru/v1/lists/tariffs?limit=5000&filter=providerKey%3Dcdek" \
     -H 'Accept: application/json' \
     -H 'Authorization: XXXX'

The responce is in the file tariffs_response.json

An example of creating an order to a pickup point of CDEK

An order is creating in SDEK delivery service:

curl -X "POST" "https://api.apiship.ru/orders" \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -H 'Authorization: XXXXX' \
     -d $'{
  "recipient": {
    "countryCode": "RU",
    "contactName": "Ivanov Ivan Ivanovich",
    "phone": "+79528819479",
    "email": "enelsilencio91@gmail.com"
  },
  "order": {
    "length": 10,
    "height": 30,
    "weight": 230,
    "clientNumber": "123_456",
    "deliveryType": 2,
    "width": 20,
    "tariffId": 55,
    "pickupType": 1,
    "pointOutId": 39718,
    "providerKey": "cdek"
  },
  "sender": {
    "region": "Moscow, г",
    "city": "Moscow",
    "street": "Semenovskaya Naberezhnaya",
    "block": "building 1",
    "house": "2/1",
    "office": "",
    "contactName": "LTD Sender",
    "countryCode": "RU",
    "phone": "+7800-111-11-11"
  },
  "cost": {
    "assessedCost": 293,
    "codCost": 110,
    "deliveryCost": 10
  },
  "places": [
    {
      "items": [
        {
          "quantity": 1,
          "articul": "К29788",
          "assessedCost": 293,
          "description": "Goods",
          "cost": 100
        }
      ],
      "weight": 230
    }
  ]
}'

Successful response to order creation

{
  "orderId": "14069426",
  "created": "2020-11-13T09:39:05+03:00"
}

Example of order cancellation

Cancels the order with orderId = 14069334 - order number in ApiShip

curl "https://api.apiship.ru/orders/14069334/cancel" \
     -H 'Authorization: XXXXXXX' \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json'

Example of a successful response (HTTP/1.1 200 OK)

{
  "orderId": "14069334",
  "canceled": "2020-11-13T09:34:50+03:00"
}

Example of an error response (HTTP/1.1 400 Bad Request)

{
  "code": "040081",
  "message": "The specified order has already been canceled",
  "description": "The specified order has already been canceled",
  "moreInfo": "Questions please email support@apiship.ru"
}

Example of an error response (HTTP/1.1 404 Not Found)

{
  "code": "040080",
  "message": "The specified order does not exist",
  "description": "The specified order does not exist",
  "moreInfo": "Questions please email support@apiship.ru"
}