Oli Docs
01. Getting Started SDK02. Getting Started SDK-VOD03. Getting Started SDK-SHORT04. VtexRequirementsPermissions keysRoutes IntegrationsEnvironments ApplicationEnvironments ClientCart CheckoutLive sharing initialize or finishGet productsSold Hook05. Shopify06. Woocommerce07. Braavo08. Linx09. Vipcommerce10. Vnda11. Jetcommerce12. Magento13. Webstorm

Getting Started Oli-Checkout

Integrations API from multiples platforms


Requirements

- Cartman
- Traking URL
- Number Pattern Seller
- X-VTEX-API-AppKey
- X-VTEX-API-AppToken

Permissions keys

- Hook orders
- Orders
- Catalog
- Tracking URL using UTM_SOURCE

Routes Integrations

- Router Get - api/oms/pvt/orders?f_shippingEstimate=0.days
- Router Get - api/oms/pvt/orders?f_UtmSource="Oli_10_3_2022"
- Router Get - api/logistics/pvt/inventory/skus/151233
- Router Get - api/oms/pvt/orders/1016771811112-01
- Router Get - api/oms/pvt/orders/1026361439159-01
- Router Get - api/oms/pvt/orders?f_UtmSource=Oli&f_status=payment-approved
- Router Get - api/orders/hook/config
- Router DELETE - api/orders/hook/config
- Router POST - api/orders/hook/config

Environments Application

- ACCESS_KEY_ID
- SECRET_ACCESS_KEY
- REGION
- PORT
- DATABASE_URL

Environments Client

- URL Cliente
- X-VTEX-API-AppKey
- X-VTEX-API-AppToken

Cart Checkout

Simple generate url to redirect users from shopping cart using identification Utm_Source.

POST Router:

https://Domain/checkout/cart

Request:

{
"items": {
"id": "string",
"quantity": 0,
"seller": "string"
},
"clientProfileData": {
"liveId": "fake-ab1c-4b59-a65e-38283984ed46"
}
}

Response:

{
"message": "string",
"status": "string",
"data": {
"url": "https://domainClient.vtexcommercestable.com.br/checkout/cart/add?sku=1233&qty=1&seller=1&sku=1233&qty=1&seller=1&utm_source=Oli_DayMonthYear
}
}

Live sharing initialize or finish

Information initialize live sharing for actualized products in live or information finish live sharing get results in live.

POST Router:

https://Domain/checkout/status/live

Request:

Example start live

{
"isNewStartLive": true,
"clientProfileData": {
"liveId": "fake-ab1c-4b59-a65e-38283984ed46",
}
}

Response:

Response start live

{
{
"message": null,
"statusCode": 200,
"status": "SUCCESS",
"data": {
"skuId": "12312",
"totalQuantity": 4
}
},
{
"message": null,
"statusCode": 200,
"status": "SUCCESS",
"data": {
"skuId": "12312",
"totalQuantity": 3
}
},
... more items actualized
}

Request:

Example end live sharing

{
"isNewStartLive": false,
"clientProfileData": {
"liveId": "fake-ab1c-4b59-a65e-38283984ed46"
}
}

Response:

Example end live sharing

{
"SalesItems": {
"Count": 104,
"Items":[
{
"creationDate": "2022-02-10T23:28:14.0000000+00:00",
"orderId": "236744506123sa4d519457113f0065324",
"authorizedDate": "2022-02-10T23:28:21.0000000+00:00",
"orderFormId": "a2asd124506ec4d519457113f00653240",
"paymentApprovedDate": "2022-02-10T23:28:25.0000000+00:00",
},
{
"creationDate": "2022-02-10T23:28:14.0000000+00:00",
"orderId": "236744506123sa4d519457113f0065324"
"authorizedDate": "2022-02-10T23:28:21.0000000+00:00",
"orderFormId": "a236744506ec4d519457113f00653240",
"paymentApprovedDate": "2022-02-10T23:28:25.0000000+00:00",
}
... more items
]
}
}

Get products

Choice products from live

POST Router:

https://Domain/checkout/get/products

Request:

{
"keyword": "camisa",
"clientProfileData": {
"liveId": "1b929f5d-ab1c-4b59-a6e5-38283984ed46"
}
}

Response:

{
"data": [
{
"product": {
"productId": "19356",
"productName": "Camisa Example in store",
"productTitle": "Camisa Example in store",
"description": "Description keyWord",
"metaTagDescription": "Meta Description KeyWord",
"Items": [
{
"images": [
{
"imageUrl": "https://store/arquivos/ids/166128/image.jpg?v=637595567273300000"
},
{
"imageUrl": "https://store/arquivos/ids/166128/image.jpg?v=637595567273300000"
},
{
"imageUrl": "https://store/arquivos/ids/166128/image.jpg?v=637595567273300000"
},
{
"imageUrl": "https://store/arquivos/ids/166128/image.jpg?v=637595567273300000"
}
],
"itemId": "23326",
"name": "Camisa Example in store - P",
"nameComplete": "Camisa Example in store - P",
"complementName": "Camisa Example in store",
"cores": [
"Rosa"
],
"tamanhos": [
"P"
]
},
{
"images": [
{
"imageUrl": "https://store/arquivos/ids/166128/image.jpg?v=637595567273300000"
},
{
"imageUrl": "https://store/arquivos/ids/166128/image.jpg?v=637595567273300000"
},
{
"imageUrl": "https://store/arquivos/ids/166128/image.jpg?v=637595567273300000"
},
{
"imageUrl": "https://store/arquivos/ids/166128/image.jpg?v=637595567273300000"
}
],
"itemId": "19357",
"name": "Camisa Example in store - M",
"nameComplete": "Camisa Example in store - M",
"complementName": "Camisa Example in store",
"cores": [
"Rosa"
],
"tamanhos": [
"M"
]
}
]
}
}
],
"status": "SUCCESS",
"statusCode": 200
}

Sold Hook

Sold product alert live

Socket Emit: soldInLive

{
"data": {
"id": "5abb01e3-0637-4029-b78b-179315796f48",
"fullName": "JulianaWerner"
},
"status": "SUCCESS",
"statusCode": 200
}