Skip to content

Create sale ​

Description ​

The call is used when your client has purchased a product, and it is located with one of the warehouse owners in our system

WARNING

If there are many product items in the order, for each of them its own Sale object is created with the same externalId

Calling ​

POST /sales

Parameters ​

json
{
  "qwqerId": "string",
  "storageId": "string",
  "itemExternalId": "string",
  "quantity": 0,
  "externalId": "string",

  //delivery info section
  "country": "string",
  "city": "string",
  "address": "string",
  "longitude": 0,
  "latitude": 0,
  //client info section
  "buyer" : {
    "name": "string",
    "surname": "string",
    "phone": "string"
  }
}

TIP

All fields in this request is required

Parameter Key NameDescription
qwqerIdMarketplace UUID
storageIdUUID of the storage where contains the required product item
To find the necessary storage use Get storage list by item API
itemExternalIdUnique identifier of product item in your system that is located in the selected storage storageId.
If this product is not in the storage, there will be an error
404
{ "message": "Item not found" }
quantityQuantity of required product item.
If the selected storage does not have the required quantity, there will be an error
400
{ "message": "Wrong quantity value" }
externalIdUnique identifier of order in your system

//delivery info section - Full information about the delivery point of the product item to the client

Example

json
{
    "country" : "Latvia",
    "city" : "Rīga",
    "address" : "Doma laukums 8a, Centra rajons",
    "longitude" : 24.105183,
    "latitude" : 56.949641
}

//client info section - Client information

json
{
  "buyer" : {
    "name": "Test",         // First name of client
    "surname": "Test",      // Last name of client
    "phone": "+3712345678"  // Phone number of client in international format
  }
}

Response ​

200 - Successful request ​

json
{
  "saleId": "string" // UUID of created Sale
}

INFO

After creating a Sale, it will have the status new

400 - Invalid request ​

json
{
  "message": "string"
}

© 2025 | SIA "QWQER EU" | qwqer.lv ™