# Orders

# Order statuses:

  • Created
  • Payed
  • ReadyForDelivery
  • PartiallyDelivered
  • AwaitingCertificateAssignment
  • Delivered - final status
  • Cancelled - final status

# Get orders

  • URL: /v1/orders
  • Method: GET
  • Headers:
    • Authorization: Bearer [YOUR_ACCESS_TOKEN] required
    • Content-Type: application/json

# Query parametrs

Parametr Type Description
page int32 The page number to be retrieved, for the list of items. So, a page=1 returns the first 20 orders. A page=2 returns the next 20 orders.

# Example

/order?page=1

# Response


  • Status: 200 OK
  • Type: json

# Body

Field Type Description
orders array (contains the orders )
totalPages int32 The total number of pages that are available for the search criteria. Clients MUST NOT assume that the value of totalPages is constant. The value MAY change from one request to the next
currentPage int32 -
pageSize int32 The maximum number of orders to return in the response. This constant equals 20
# Order
Field Type Description
id uuid -
number int32 -
createdDate DateTime -
status enum order statuses
participantLogin string -
total decimal -
# Example:
{
  "data": [
    {
      "id": "ef4eb23e-1cf0-4cbe-82c6-c118e5605042",
      "number": 3048,
      "createdDate": "2020-01-11T16:13:56.814239",
      "status": "Created",
      "participantLogin": "sss@ss.ss_company",
      "total": 2200
    },
    {
      "id": "ef4eb23e-1cf0-4cbe-82c6-c118e5605041",
      "number": 3047,
      "createdDate": "2020-01-11T15:58:05.816375",
      "status": "Created",
      "participantLogin": "sss@ss.ss_company",
      "total": 1000
    }
  ],
  "totalPages": 1,
  "currentPage": 1,
  "pageSize": 20
}

# Create order

  • URL: /v1/orders
  • Method: POST
  • Headers:
    • Authorization: Bearer [YOUR_ACCESS_TOKEN] required
    • Content-Type: application/json

# Body

Field Type Description
orderId uuid Required. Generate on client side
participant object Participant Required.
ecards array ECard Required.
# Participant
Field Type Description
participant.email string Required
participant.name string Required
participant.phone string Required
# ECard
Field Type Description
id int32 Required
quantity int32 Required
faceValue string Required
# Example:
{
   "orderId": "B5AA69DF-61A5-4D97-B1FB-4F6772DFBBEB",
   "participant": {
       "email": "test@test.test",
       "phone": "79251153242",         
       "name": "John Doe"
   },
   "ecards": [
       {
           "id": "1",
           "quantity": 1,
           "faceValue": "100 ₽"
       },
       {
           "id": "2",
           "quantity": 4,
           "faceValue": "500 ₽"
       }
   ]
}

# Response

  • Status: 200 (OK)

# Get order status

  • URL: /v1/orders/{order_id}/status

  • Method: GET

  • Headers:

    • Authorization: Bearer [YOUR_ACCESS_TOKEN] required
    • Content-Type: application/json

    # Path parameters

Parametr Type Description
order_id uuid The ID of the order for which to show status.

# Response

  • Status: 200 (OK)

# example

{
 "status": "Created",
}

# Get order details

coming soon