Notification
Access the boilerplate repository for the notification app to clone it and begin development.
A notification app published by a carrier will include an endpoint like this one:
https://app.io.vtex.com/{app_name}/{app_version}/{account}/{workspace}/notify
After an order is invoiced, the VTEX notification hub automatically makes a POST
request to this endpoint with the package’s details. Then the app should respond with the order’s tracking number. See the examples below, and to learn more about this request, access the notification API request documentation.
Request body example:
_152{_152 "email": "email",_152 "dispatchOrder": {_152 "id": "653560c2-7965-4614-a730-8e45c89bf284",_152 "packages": [_152 {_152 "id": "6bb4c320-932b-46b6-a628-b61b133052e9",_152 "orderId": "00-1053722798105-01",_152 "items": [_152 {_152 "id": "148350",_152 "name": "Kit Capacho Geométrico por Marcelo Nunes - 3 Novelos",_152 "quantity": 1_152 }_152 ],_152 "dimension": {_152 "height": 20.0,_152 "length": 20.0,_152 "width": 30.0,_152 "weight": 1458.0_152 },_152 "recipientPostalCode": "03681-030",_152 "recipient": {_152 "cpf": "00000000000",_152 "id": null,_152 "name": "Fake Person",_152 "address": {_152 "postalCode": "00000-000",_152 "country": {_152 "code": "BRA",_152 "name": "BRA"_152 },_152 "subregion1": {_152 "code": "SP",_152 "name": "SP"_152 },_152 "subregion2": {_152 "code": "São Paulo",_152 "name": "São Paulo"_152 },_152 "subregion3": {_152 "code": "Burgo Paulista",_152 "name": "Burgo Paulista"_152 },_152 "street": "Rua Exemplo",_152 "number": "01",_152 "complement": null,_152 "location": {_152 "lat": -46.48582077026367,_152 "lng": -23.521709442138672_152 }_152 },_152 "email": null,_152 "phone": "+5511111111111"_152 },_152 "invoiceData": {_152 "number": "445494",_152 "value": 6909.0,_152 "url": "",_152 "date": "2020-08-14T19:43:09.4740645+00:00",_152 "invoiceAccessKeys": [_152 "35200844913721000168550010004454941205352231"_152 ],_152 "hasIcms": false,_152 "hasInsurance": false_152 },_152 "trackingData": {_152 "number": "OM265512653BR",_152 "log": [],_152 "finished": false,_152 "finishedDate": null_152 },_152 "origin": "Fulfillment",_152 "status": "invoiced",_152 "orderCreationDate": "2020-08-11T19:46:40.0305809+00:00",_152 "labelIssuedDate": null,_152 "shippingEstimate": "13bd",_152 "shippingEstimateDate": "2020-08-31T21:00:00+00:00",_152 "shippingData": {_152 "shippingPolicyName": "VTEXLOG EXAMPLE",_152 "shippingPolicyId": "vtexlog_policy_id",_152 "carrierName": "vtexlog"_152 }_152 }_152 ],_152 "sender": {_152 "cnpj": "00000000000000",_152 "fantasyName": null,_152 "stateRegistration": null,_152 "id": null,_152 "name": "LTDA",_152 "address": {_152 "postalCode": "03475015",_152 "country": {_152 "code": "Brasil",_152 "name": "Brasil"_152 },_152 "subregion1": {_152 "code": "SP",_152 "name": "SP"_152 },_152 "subregion2": {_152 "code": "São Paulo",_152 "name": "São Paulo"_152 },_152 "subregion3": {_152 "code": "Vila Antonieta",_152 "name": "Vila Antonieta"_152 },_152 "street": "Rua Exemplo",_152 "number": "01",_152 "complement": "",_152 "location": null_152 },_152 "email": null,_152 "phone": "+5511111111111"_152 },_152 "carrier": {_152 "cnpj": "00000000000000",_152 "fantasyName": "carrier",_152 "stateRegistration": "096/3624636",_152 "id": "vtexlog_exemplo",_152 "name": "Carrier LTDA.",_152 "address": {_152 "postalCode": "90200001",_152 "country": {_152 "code": "BRA",_152 "name": "Brasil"_152 },_152 "subregion1": {_152 "code": "RS",_152_152 "name": "Rio Grande do Sul"_152 },_152 "subregion2": {_152 "code": "Porto_Alegre",_152 "name": "Porto Alegre"_152 },_152 "subregion3": {_152 "code": "Anchieta",_152 "name": "Anchieta"_152 },_152 "street": "Rua Exemplo",_152 "number": "01",_152 "complement": "Pavilhão 6",_152 "location": null_152 },_152 "email": "email",_152 "phone": "+5511111111111"_152 }_152 }_152}
Response body example:
_11{_11 <packageId> : {_11 "tracking": {_11 "number": string,_11 "url": string_11 },_11 "notification": {_11 "id": string_11 }_11 }_11}
Learn more
See this guide on how to develop carrier apps on VTEX IO. You can also learn more about the integration flow and tracking for carrier apps.