API Dokumentácia: Vytvorenie Objednávky v E-shope

Endpoint:

URL: POST /shops/order

Content-Type: application/json

Zabezpečenie: X-Api-Key (API kľúč)

Požiadavka (Request):

      
{
  "orderNumber": "string - required - max 64",
  "emailAddress": "string - required - max 256",
  "phoneNumber": "string - max 64",
  "billingAddress": {
    "street": "string - max 256",
    "town": "string - max 256",
    "postCode": "string - max 32",
    "countryCode": "string - exactly 2"
  },
  "shippingAddress": {
    "street": "string - max 256",
    "town": "string - max 256",
    "postCode": "string - max 32",
    "countryCode": "string - exactly 2"
  },
  "timeCreated": "2024-02-20T13:13:43.949Z"
}
      
    

Odpoveď (Response):

HTTP kód: 200

Content-Type: application/json

      {}
    

Chybové odpovede:

HTTP kódy: 400-599

Content-Type: application/problem+json

      
{
  "type": "string",
  "title": "string",
  "status": 400,
  "detail": "string",
  "instance": "string",
  "errors": {
    "propA": ["string"],
    "propB": ["string"],
    "propC": ["string"]
  }
}