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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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

Body Params
string
required

Unique identifier for the order in your store such as a line item identifier. An identifier may only contain alphanumerics 0-9 a-z A-Z and unreserved characters - . _ ~ . Any other special characters must be safely encoded.

billing
object
required

The billing address for the order.

customer
object
required

A nested object containing the information of the customer for this order.

string
required

Three-letter ISO 4217 currency code, in uppercase. Must be a supported currency.

offer
object
required

A nested object containing the information of the offer purchased.

products
array of objects

A list of nested objects containing the information of the products purchased. The number of products required for an order can be determined by the value of the required_products field of the linked offer. Values include: exactly_one when only one product is required, at_least_one when at least one product is required, and any when any number of products can be set including none.

products
date-time

The intended insurance start date, by default set to the time at which the object was created. Formatted as a RFC 3339 timestamp, with up to nanosecond precision.

company
object

A nested object containing the company information of this order if placed by a B2B customer. This object is mandatory for B2B stores.

physical_store
object

A nested object containing the information of the physical store of this order if placed from a physical store.

string

Will be used for communications with the customer concerning the created order. Follows the same rules as the Accept-Language header.

string

The ID of the store the order belongs to. This is a required parameter if using a multi store API keys.

string

User metadata for the order.

string
enum
Allowed:
seller
object
subscription_data
object

Details of the subscription associated with this order. Evy will create the subscription simultaneously with the order. This field is mandatory if the order includes a recurring subscription.

string

A unique registration code provided by the merchant, enabling the customer to register their contract with Evy.

Language
LoadingLoading…