Create an order

Creates a new paid order with Evy. Following this, a new contract will be generated and sent to the customer. The contract can be retrieved with the contract resource endpoints.

Request

{
  "id": "order-45",
  "billing": {
    "city": "Paris",
    "country": "FR",
    "line1": "12 rue de la poste",
    "name": "Jane Doe",
    "phone": "+33712457843",
    "postal_code": "75002",
    "state": "Ile de France"
  },
  "currency": "EUR",
  "customer": {
    "external_id": "my-customer-12345",
    "city_of_birth": "Paris",
    "country_of_birth": "FR",
    "date_of_birth": "1985-01-05",
    "email": "[email protected]",
    "first_name": "Jane",
    "last_name": "Doe",
    "phone": "+33712457843"
  },
  "contract_registration_code": "registration-code-12345",
  "physical_store": {
    "id": "00001",
    "name": "Magasin Paris 00001"
  },
  "products": [
    {
      "id": "product-1-vaccum-cleaner",
      "title": "Dyson vacuum cleaner",
      "category_id": "1",
      "amount": 13999,
      "serial_number": "123456789",
      "condition": "refurbished",
      "refurbished_grade": "A",
      "purchase_date": "2023-12-25"
    },
    {
      "id": "product-2-phone",
      "title": "Phone model 10 Pro",
      "category_id": "2",
      "amount": 79999,
      "imei": "537937692990109",
      "condition": "new"
    }
  ],
  "offer": {
    "id": "8455a9e1-2e0e-49be-b263-f4f4923e8f66",
    "amount": 1000,
    "purchased_at": "2022-03-01T17:28:33.689374Z"
  },
  "language": "fr-FR"
}

Returns
An order object is returned if the order creation succeeded. This call will return an error if something goes wrong. A common error can be missing/invalid create parameters (400 Bad Request) or an invalid offer (422 Unprocessable Entity).

Parameters

Language