Orders

In this section you will find all the APIs of Ventiapp related to Sales

Get Orders

GET https://ventiapi.azurewebsites.net/api/orders/orders

This method returns the sales of the different sales channels that were captured by Ventiapp. The order in which they are displayed is by creation date in decreasing order (the newest will be seen first). This API can consume a maximum of 1 occurrence per minute.

Query Parameters

Name
Type
Description

channel

string

Canal para poder filtrar las ventas

date

string

Fecha mínima de la cual se requieren las órdenes. formato MM/DD/YYYY ej: 06/30/2019

to

string

Fecha máxima de la cual se requieren las órdenes. formato MM/DD/YYYY ej: 06/30/2019

offset

number

Cantidad de órdenes salteadas, ejemplo offset = 50 nos traerá de la órden 51 a la 100

paging

number

Cantidad de items por página, máximo 50 items

sort

string

Tipo de ordenamiento van a tener las ordenes, mas detalle a continuación

Headers

Name
Type
Description

Authorization

string

Bearer +token

{
  "paging": 50,
  "offset": 0,
  "total": 2,
  "sort": "added_desc",
  "results": [
    {
      "orderId": 1234,
      "channel": "meli",
      "dateAdded": "2018-10-29T00:00:00",
      "dateCreated":"2018-10-29T00:00:00",
      "dateModified": "2018-10-29T00:00:00",
      "externalId": "111444123",
      "total": 660.0,
      "currency": "MXN",
      "tax": 0.16,
      "comments": "Send it before tuesday",
      "itemsQuantity": 2,
      "title": "Order Title",
      "internalStatus": 1,
      "amazonFulfillment": "false",
      "cartId": "00000101110002",
      "externalNumber" : "12314512",
      "items": [
        {
          "itemExternalId": "MLM3312341",
          "title": "Item 1",
          "price": 460.0,
          "variationId": "13818313",
          "variationName": "Red",
          "itemQuantity": 1,
          "total": 460.0,
          "sku": "ITEM-RED001",
          "erpId": null
        },
        {
          "itemExternalId": "MLM3317841",
          "title": "Item 2",
          "price": 200.0,
          "variationId": null,
          "variationName": null,
          "itemQuantity": 1,
          "total": 200.0,
          "sku": "PLAINITEM001",
          "erpId": null
        }
      ],
      "buyer": {
        "name": "John",
        "lastname": "Doe",
        "email": "email@api.com",
        "state": "Distrito Federal",
        "address": "Street Address 123",
        "city": "Mexico City",
        "zipcode": "06700",
        "nickname": "JOHNDOEVENTI",
        "phone": "5584848152",
        "externalId": "551331413"
      },
      "shipping": {
        "sellerInfo": "MYSELLERNAME",
        "sellerId": null,
        "shipmentType": "me2",
        "shippingStatus": "shipped",
        "shippingCourier": "drop_off",
        "shippingId": "27586098188",
        "shippingType": "me2",
        "ventiShipping": false,
        "ventiCourierId": null,
        "shippingTrackingId": "10003313132",
        "shippingCourierExternal": "Fedex Express",
        "shippingCost": 120.0
      },
      "paymentMethods": [
                {
                    "externalId": "5531048951",
                    "paymentMethod": "oxxo"
                }
            ]
    },
    {
      "orderId": 1234,
      "channel": "meli",
      "dateAdded": "2018-10-29T00:00:00",
      "dateCreated":"2018-10-29T00:00:00",
      "dateModified": "2018-10-29T00:00:00",
      "externalId": "111444124",
      "total": 660.0,
      "currency": "MXN",
      "tax": 0.16,
      "comments": "Send it before tuesday",
      "itemsQuantity": 2,
      "title": "Order Title 2",
      "internalStatus": 1,
      "amazonFulfillment": "false",
      "cartId": "00000101110007",
      "items": [
        {
          "itemExternalId": "MLM3312341",
          "title": "Item 1",
          "price": 460.0,
          "variationId": "13818313",
          "variationName": "Red",
          "itemQuantity": 1,
          "total": 460.0,
          "sku": "ITEM-RED001",
          "erpId": null
        },
        {
          "itemExternalId": "MLM3317841",
          "title": "Item 2",
          "price": 200.0,
          "variationId": null,
          "variationName": null,
          "itemQuantity": 1,
          "total": 200.0,
          "sku": "PLAINITEM001",
          "erpId": null
        }
      ],
      "buyer": {
        "name": "John",
        "lastname": "Doe",
        "email": "email@api.com",
        "state": "Distrito Federal",
        "address": "Street Address 123",
        "city": "Mexico City",
        "zipcode": "06700",
        "nickname": "JOHNDOEVENTI",
        "phone": "5584848152",
        "externalId": "551331413"
      },
      "shipping": {
        "sellerInfo": "MYSELLERNAME",
        "sellerId": null,
        "shipmentType": "me2",
        "shippingStatus": "shipped",
        "shippingCourier": "drop_off",
        "shippingId": "27586098188",
        "shippingType": "me2",
        "ventiShipping": false,
        "ventiCourierId": null,
        "shippingTrackingId": "10003313132",
        "shippingCourierExternal": "Fedex Express",
        "shippingCost": 120.0
      },
      "paymentMethods": [
                {
                    "externalId": "5531048951",
                    "paymentMethod": "oxxo"
                }
            ]
    }
  ]
}

Valid options for the sort parameter are:

  • added_desc : Fecha de Alta en VentiApp descendiente

  • added_asc: Fecha de Alta en VentiApp ascendiente

  • created_desc: Fecha de creación inicial de la compra descendiente

  • created_asc: Fecha de creación inicial de la compra ascendiente

  • modified_desc: Fecha de modificación de la compra descendiente

  • modified_asc: Fecha de modificación de la compra ascendiente

The valid options for the channel parameter are:

  • "amazon" (Amazon)

  • "claroshop" (Claroshop)

  • "elektra" (Elektra)

  • "linio" (Linio)

  • "meli" (Mercado Libre)

  • "mshops" (Mercado Shops)

  • "prestashop" (Prestashop)

  • "shopify" (Shopify)

  • "venticommerce" (VentiCommerce)

  • "vtex" (VTEX)

  • "walmart" (Walmart)

  • "wish" (Wish)

  • "woocommerce" (WooCommerce)

Find Order

GET https://ventiapi.azurewebsites.net/api/orders/findorder

This method searches for a specific sale, or a cart with associated orders.

Query Parameters

Name
Type
Description

orderid

string

ID Externo de la órden ó ID de carrito en caso de aplicar (ej: ID de MercadoLibre, se encuentra en número de órden y tiene un valor como el siguiente 111444123)

{
  "paging": 50,
  "offset": 0,
  "total": 1,
  "sort":null,
  "results": [
    {
      "orderId": 1234,
      "channel": "meli",
      "dateAdded": "2018-10-29T00:00:00",
      "dateModified": "2018-10-29T00:00:00",
      "externalId": "111444123",
      "total": 660.0,
      "currency": "MXN",
      "tax": 0.16,
      "comments": "Send it before tuesday",
      "itemsQuantity": 2,
      "title": "Order Title",
      "internalStatus": 1,
      "amazonFulfillment": "false",
      "cartId": "00000101110002",
      "externalNumber" : "12314512",
      "items": [
        {
          "itemExternalId": "MLM3312341",
          "title": "Item 1",
          "price": 460.0,
          "variationId": "13818313",
          "variationName": "Red",
          "itemQuantity": 1,
          "total": 460.0,
          "sku": "ITEM-RED001",
          "erpId": null
        },
        {
          "itemExternalId": "MLM3317841",
          "title": "Item 2",
          "price": 200.0,
          "variationId": null,
          "variationName": null,
          "itemQuantity": 1,
          "total": 200.0,
          "sku": "PLAINITEM001",
          "erpId": null
        }
      ],
      "buyer": {
        "name": "John",
        "lastname": "Doe",
        "email": "email@api.com",
        "state": "Distrito Federal",
        "address": "Street Address 123",
        "city": "Mexico City",
        "zipcode": "06700",
        "nickname": "JOHNDOEVENTI",
        "phone": "5584848152",
        "externalId": "551331413"
      },
      "shipping": {
        "sellerInfo": "MYSELLERNAME",
        "sellerId": null,
        "shipmentType": "me2",
        "shippingStatus": "shipped",
        "shippingCourier": "drop_off",
        "shippingId": "27586098188",
        "shippingType": "me2",
        "ventiShipping": false,
        "ventiCourierId": null,
        "shippingTrackingId": "10003313132",
        "shippingCourierExternal": "Fedex Express"
      }
    },
    {
      "channel": "meli",
      "dateAdded": "2018-10-29T00:00:00",
      "dateCreated":"2018-10-29T00:00:00",
      "dateModified": "2018-10-29T00:00:00",
      "externalId": "111444124",
      "total": 660.0,
      "currency": "MXN",
      "tax": 0.16,
      "comments": "Send it before tuesday",
      "itemsQuantity": 2,
      "title": "Order Title 2",
      "internalStatus": 1,
      "amazonFulfillment": "false",
      "cartId": "00000101110007",
      "items": [
        {
          "itemExternalId": "MLM3312341",
          "title": "Item 1",
          "price": 460.0,
          "variationId": "13818313",
          "variationName": "Red",
          "itemQuantity": 1,
          "total": 460.0,
          "sku": "ITEM-RED001",
          "erpId": null
        },
        {
          "itemExternalId": "MLM3317841",
          "title": "Item 2",
          "price": 200.0,
          "variationId": null,
          "variationName": null,
          "itemQuantity": 1,
          "total": 200.0,
          "sku": "PLAINITEM001",
          "erpId": null
        }
      ],
      "buyer": {
        "name": "John",
        "lastname": "Doe",
        "email": "email@api.com",
        "state": "Distrito Federal",
        "address": "Street Address 123",
        "city": "Mexico City",
        "zipcode": "06700",
        "nickname": "JOHNDOEVENTI",
        "phone": "5584848152",
        "externalId": "551331413"
      },
      "shipping": {
        "sellerInfo": "MYSELLERNAME",
        "sellerId": null,
        "shipmentType": "me2",
        "shippingStatus": "shipped",
        "shippingCourier": "drop_off",
        "shippingId": "27586098188",
        "shippingType": "me2",
        "ventiShipping": false,
        "ventiCourierId": null,
        "shippingTrackingId": "10003313132",
        "shippingCourierExternal": "Fedex Express"
      },
      "paymentMethods": [
                {
                    "externalId": "5531048951",
                    "paymentMethod": "oxxo"
                }
            ]
    }
  ]
}

Create Order

POST https://ventiapi.azurewebsites.net/api/orders/createorder

This method is used to insert an order in Ventiapp

{
	"message": "order created successfully",
	"order": {
		"orderId": 1234,
		"channel": "your_channel",
		"dateAdded": "2018-10-29T00:00:00",
		"dateModified": "2018-10-29T00:00:00",
		"externalId": "111444123",
		"total": 660.0,
		"currency": "MXN",
		"tax": 0.16,
		"comments": "Send it before tuesday",
		"itemsQuantity": 2,
		"title": "Order Title",
		"internalStatus": 1,
		"amazonFulfillment": "false",
		"cartId": "00000101110002",
		"externalNumber": "12314512",
		"items": [{
				"itemExternalId": "MLM3312341",
				"title": "Item 1",
				"price": 460.0,
				"variationId": "13818313",
				"variationName": "Red",
				"itemQuantity": 1,
				"total": 460.0,
				"sku": "ITEM-RED001",
				"erpId": null
			},
			{
				"itemExternalId": "MLM3317841",
				"title": "Item 2",
				"price": 200.0,
				"variationId": null,
				"variationName": null,
				"itemQuantity": 1,
				"total": 200.0,
				"sku": "PLAINITEM001",
				"erpId": null
			}
		],
		"buyer": {
			"name": "John",
			"lastname": "Doe",
			"email": "email@api.com",
			"state": "Distrito Federal",
			"address": "Street Address 123",
			"city": "Mexico City",
			"zipcode": "06700",
			"nickname": "JOHNDOEVENTI",
			"phone": "5584848152",
			"externalId": "551331413"
		},
		"shipping": {
			"sellerInfo": "MYSELLERNAME",
			"sellerId": null,
			"shipmentType": "me2",
			"shippingStatus": "shipped",
			"shippingCourier": "drop_off",
			"shippingId": "27586098188",
			"shippingType": "me2",
			"ventiShipping": false,
			"ventiCourierId": null,
			"shippingTrackingId": "10003313132",
			"shippingCourierExternal": "Fedex Express"
		}
	}
}

Body de la llamada:

{
		
		"channel": "your_channel", 
		"externalId": "111444123", 
		"total": 660.0,
		"currency": "MXN",
		"tax": 0.16,
		"comments": "Send it before tuesday",
		"title": "Order Title",
		"cartId": "00000101110002",
		"externalNumber": "12314512",
		"items": [{
				"itemExternalId": "MLM3312341",
				"title": "Item 1",
				"price": 460.0,
				"itemQuantity": 1,
				"total": 460.0,
				"sku": "ITEM-RED001",
				"erpId": "ITEM-123"
			},
			{
				"itemExternalId": "MLM3317841",
				"title": "Item 2",
				"price": 200.0,
				"itemQuantity": 1,
				"total": 200.0,
				"sku": "PLAINITEM001",
				"erpId": "ITEM-456"
			}
		],
		"buyer": {
			"name": "John",
			"lastname": "Doe",
			"email": "email@api.com",
			"state": "Distrito Federal",
			"address": "Street Address 123",
			"city": "Mexico City",
			"zipcode": "06700",
			"nickname": "JOHNDOEVENTI",
			"phone": "5584848152",
			"externalId": "551331413"
		},
		"shipping": {
			"sellerInfo": "MYSELLERNAME",
			"sellerId": "MYSELLERID",
			"shipmentType": "Express",
			"shippingStatus": "shipped",
			"shippingCourier": "drop_off",
			"shippingId": "27586098188",
			"shippingTrackingId": "10003313132",
			"shippingCourierExternal": "Fedex Express",
      "shippingCost": 120.0
		}

Update Order

PUT https://ventiapi.azurewebsites.net/api/orders/updateorder/

This method is used to update an order in Ventiapp. The fields are optional, those that are not in the call will be ignored

Query Parameters

Name
Type
Description

orderId

string

{
	"message": "order created successfully",
	"order": {
		"orderId": 1234,
		"channel": "your_channel",
		"dateAdded": "2018-10-29T00:00:00",
		"dateModified": "2018-10-29T00:00:00",
		"externalId": "111444123",
		"total": 660.0,
		"currency": "MXN",
		"tax": 0.16,
		"comments": "Send it before tuesday",
		"itemsQuantity": 2,
		"title": "Order Title",
		"internalStatus": 1,
		"amazonFulfillment": "false",
		"cartId": "00000101110002",
		"externalNumber": "12314512",
		"items": [{
				"itemExternalId": "MLM3312341",
				"title": "Item 1",
				"price": 460.0,
				"variationId": "13818313",
				"variationName": "Red",
				"itemQuantity": 1,
				"total": 460.0,
				"sku": "ITEM-RED001",
				"erpId": null
			},
			{
				"itemExternalId": "MLM3317841",
				"title": "Item 2",
				"price": 200.0,
				"variationId": null,
				"variationName": null,
				"itemQuantity": 1,
				"total": 200.0,
				"sku": "PLAINITEM001",
				"erpId": null
			}
		],
		"buyer": {
			"name": "John",
			"lastname": "Doe",
			"email": "email@api.com",
			"state": "Distrito Federal",
			"address": "Street Address 123",
			"city": "Mexico City",
			"zipcode": "06700",
			"nickname": "JOHNDOEVENTI",
			"phone": "5584848152",
			"externalId": "551331413"
		},
		"shipping": {
			"sellerInfo": "MYSELLERNAME",
			"sellerId": null,
			"shipmentType": "me2",
			"shippingStatus": "shipped",
			"shippingCourier": "drop_off",
			"shippingId": "27586098188",
			"shippingType": "me2",
			"ventiShipping": false,
			"ventiCourierId": null,
			"shippingTrackingId": "10003313132",
			"shippingCourierExternal": "Fedex Express"
		}
	}
}

Example:

{
		
		"channel": "your_channel", 
		"externalId": "111444123", 
		"total": 660.0,
		"currency": "MXN",
		"tax": 0.16,
		"comments": "Send it before tuesday",
		"title": "Order Title",
		"cartId": "00000101110002",
		"externalNumber": "12314512",
		"items": [{
				"itemExternalId": "MLM3312341",
				"title": "Item 1",
				"price": 460.0,
				"itemQuantity": 1,
				"total": 460.0,
				"sku": "ITEM-RED001",
				"erpId": "ITEM-123"
			},
			{
				"itemExternalId": "MLM3317841",
				"title": "Item 2",
				"price": 200.0,
				"itemQuantity": 1,
				"total": 200.0,
				"sku": "PLAINITEM001",
				"erpId": "ITEM-456"
			}
		],
		"buyer": {
			"name": "John",
			"lastname": "Doe",
			"email": "email@api.com",
			"state": "Distrito Federal",
			"address": "Street Address 123",
			"city": "Mexico City",
			"zipcode": "06700",
			"nickname": "JOHNDOEVENTI",
			"phone": "5584848152",
			"externalId": "551331413"
		},
		"shipping": {
			"sellerInfo": "MYSELLERNAME",
			"sellerId": "MYSELLERID",
			"shipmentType": "Express",
			"shippingStatus": "shipped",
			"shippingCourier": "drop_off",
			"shippingId": "27586098188",
			"shippingTrackingId": "10003313132",
			"shippingCourierExternal": "Fedex Express"
		}

GET https://ventiapi.azurewebsites.net/api/orders/printlabel/

This method is used to print the guide associated with the sale. When the guide is printed for the first time, the associated marketplace will notify the client that the order is being processed automatically, that is why we recommend verifying this process before an implementation in an automated system. The externalId, or the orderId are mandatory, with one of the two the call is already valid The type field is optional, in this you have to indicate if it is zpl or pdf (Not all channels support ZPL, Ventiapp is working to perform the conversion). The default value is pdf Channels: - Guías generadas desde Ventiapp (ej: EnviaYa, Skydropx o paquetería propia) - Mercado Libre (BETA) - Mercado Shops (BETA) - Linio (BETA) - Amazon (en desarrollo) - Claroshop (en desarrollo) - Walmart (en desarollo)

Query Parameters

Name
Type
Description

externalId

string

ID externo de la venta (del marketplace o plataforma de ecommerce)

type

string

Tipo de guía que se desea imprimir

orderId

integer

ID de Ventiapp

Última actualización