Create Order

Creates an Order in Centelar.

POST /api/v1.1/order

Request Parameters

The request must include the connection_id parameter in the url

Name Type Description
connection_id integer Required. Id of the ecommerce integration in Centelar

Request Body

The request must send a json body following the structure below.

Name Type Description
creation_date string Required. Date and time of the purchase
ext_code string Required. An identifier of the purchase in the source system
price float Required. Total price of the order
customer Customer object Required. Information about the customer
items array of Item Required. Information about the products sold, their price and quantity
payments array of Payment Required. Information about the payments the customer made
shipping_address Address object Required. Information about the location where the products are to be delivered
billing_address Address object Required. Information about the billing address of the customer
shipping_cost float Price that’s paid by the customer to cover delivery costs (this price is included in the total price field)
shipping_ext_code string Represents the id of the shipping process for this Order, for example an ID created by a third party shipments processor

Structure of a Customer object

Name Type Description
first_name string Required
last_name string Required
document_type string Either literals ‘cuit’ or ‘dni’ are expected
document string The value for the document_type
email string  
phone string  
is_corporate boolean  

Structure of a Item object

Name Type Description
product_code string Required. Product code in Centelar
quantity integer Required. How many of this product were sold
price float Required. Full unit price paid (including VAT)
location_id integer Source location of the stock (by id)
location_name string Source location name, if location_id is not passed

Structure of a Address object

Name Type Description
disposition string Use ‘pickup’ if the location is a store location where the client will go and pick-up the product
street string Required (if disposition is other than ‘pickup’). The street
number string The number in the street
complement string  
neighborhood string  
postal_code string  
city string  
state string  
country string  
receiver_name string  
geo_coordinates array of 2 floats  
id integer Required (if disposition is ‘pickup’ and name is not set) Only usable when disposition is ‘pickup’. Used to reference the specific store location for pickup.
name string Required (if disposition is ‘pickup’ and id is not set) Only usable when disposition is ‘pickup’. Used to reference the specific store location for pickup.

Structure of a Payment object

Name Type Description
type string Required. Use ‘mercadopago’, ‘creditcard’ or ‘promissory’
payment_system string The readable name of the payment system used, e.g. ‘Mercado Pago’
amount string Required. The amount paid
last_digits string  
transaction_id string  
payment_system_data string  

Request Example

{
  "price": 236.9,
  "customer": {
    "first_name": "Carlos",
    "last_name": "Perez",
    "email": "somemail@yahoo.com",
    "documentType": "dni",
    "document": "28123123",
    "phone": "+541164446444",
    "is_corporate": false
  },
  "items": [
    {
      "product_code": "162120",
      "quantity": 2,
      "price": 123.45
    }
  ],
  "payments": [
    {
      "type": "mercadopago",
      "amount": 236.9,
      "transaction_id": "432894032842",
      "last_digits": "1234",
      "payment_system": "Mercado Pago",
      "payment_system_data": {
        "acquirer": "mercadopago",
        "Tid": "432894032842",
        "authId": "32343243242",
        "message": "transaction completed"
      }
    }
  ],
  "shipping_address": {
    "disposition": "residential",
    "receiver_name": "Cecilia Tornim",
    "postal_code": "1119",
    "city": "Ciudad Autónoma de Buenos Aires",
    "state": "Ciudad Autónoma de Buenos Aires",
    "country": "AR",
    "street": "Av Pueyrredón",
    "number": "1233",
    "complement": "7 b",
    "geoc_oordinates": [
      -59.38155746459961,
      -30.603683471679688
    ]
  },
  "creation_date": "2023-12-21T05:48:35",
  "ext_code": "un_id_aqui"
}

Response Sample

Status: 200 OK
{
  "success": true,
  "order_id": 440065206
}