You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: vtex/utils/openapi/vcs.openapi.gen.ts
+64
Original file line number
Diff line number
Diff line change
@@ -17104,6 +17104,70 @@ ascending?: boolean
17104
17104
}
17105
17105
}
17106
17106
}
17107
+
/**
17108
+
* Cancels an order using its identification code (`orderId`). A common scenario is when the seller has a problem fulfilling the order and requests the marketplace to cancel it.
17109
+
*
17110
+
* ## Orders that cannot be canceled
17111
+
*
17112
+
* The following situations do not allow order cancellation:
17113
+
*
17114
+
* - **Partial invoices:** [Partially invoiced](https://help.vtex.com/en/tracks/orders--2xkTisx4SXOWXQel8Jg8sa/q9GPspTb9cHlMeAZfdEUe) orders cannot be canceled. However, the customer can [change the order](https://developers.vtex.com/docs/guides/change-order) to replace or remove items from it.
17115
+
*
17116
+
* - **Invoiced status:** Orders with `invoiced` [status](https://help.vtex.com/en/tutorial/order-flow-and-status--tutorials_196) cannot be canceled. If the order has already been invoiced, you can use the [Order invoice notification](https://developers.vtex.com/docs/api-reference/orders-api#post-/api/oms/pvt/orders/-orderId-/invoice) endpoint to generate a return invoice.
17117
+
*
17118
+
* - **Incomplete orders:** [Incomplete orders](https://help.vtex.com/en/tutorial/how-incomplete-orders-work--tutorials_294) cannot be canceled.
17119
+
*
17120
+
* ## Declining order cancelation
17121
+
*
17122
+
* The order flow has a cancellation window (grace period) in which the customer can automatically cancel the order. Except for that period, the seller can [decline an order cancellation request](https://help.vtex.com/en/tutorial/declining-order-cancelation--F2n0h1TeQ5td540Gjyff4), regardless of whether the customer or the marketplace initiated it.
17123
+
*
17124
+
* For more information, see [Order canceling improvements](https://developers.vtex.com/docs/guides/order-canceling-improvements).
17125
+
*
17126
+
* ## Permissions
17127
+
*
17128
+
* Any user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:
* You can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):
17135
+
*
17136
+
* | **Role** | **Resource** |
17137
+
* | --------------- | ----------------- |
17138
+
* | OMS - Full access | Cancel order |
17139
+
* | IntegrationProfile - Fulfillment Oms | Cancel order |
17140
+
*
17141
+
* >❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).
17142
+
*
17143
+
* To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).
17144
+
*/
17145
+
"POST /api/oms/pvt/orders/:orderId/cancel": {
17146
+
body: {
17147
+
/**
17148
+
* Reason for cancelling the order.
17149
+
*/
17150
+
reason?: string
17151
+
/**
17152
+
* If requested by the user
17153
+
*/
17154
+
requestedByUser?: boolean
17155
+
}
17156
+
response: {
17157
+
/**
17158
+
* Date and time when the notification was received.
17159
+
*/
17160
+
date?: string
17161
+
/**
17162
+
* Identification of the order in the seller.
17163
+
*/
17164
+
orderId?: string
17165
+
/**
17166
+
* Protocol code generated by the update. It may be `null`.
17167
+
*/
17168
+
receipt?: string
17169
+
}
17170
+
}
17107
17171
/**
17108
17172
* Retrieves information on pickup points close to a given location determined by geocoordinates or postal code.
Copy file name to clipboardexpand all lines: vtex/utils/openapi/vcs.openapi.json
+107
Original file line number
Diff line number
Diff line change
@@ -34061,6 +34061,113 @@
34061
34061
"deprecated": false
34062
34062
}
34063
34063
},
34064
+
"/api/oms/pvt/orders/{orderId}/cancel": {
34065
+
"post": {
34066
+
"tags": [
34067
+
"Orders"
34068
+
],
34069
+
"summary": "Cancel order",
34070
+
"description": "Cancels an order using its identification code (`orderId`). A common scenario is when the seller has a problem fulfilling the order and requests the marketplace to cancel it. \r\n\r\n## Orders that cannot be canceled \r\n\r\nThe following situations do not allow order cancellation: \r\n\r\n- **Partial invoices:** [Partially invoiced](https://help.vtex.com/en/tracks/orders--2xkTisx4SXOWXQel8Jg8sa/q9GPspTb9cHlMeAZfdEUe) orders cannot be canceled. However, the customer can [change the order](https://developers.vtex.com/docs/guides/change-order) to replace or remove items from it. \r\n\r\n- **Invoiced status:** Orders with `invoiced` [status](https://help.vtex.com/en/tutorial/order-flow-and-status--tutorials_196) cannot be canceled. If the order has already been invoiced, you can use the [Order invoice notification](https://developers.vtex.com/docs/api-reference/orders-api#post-/api/oms/pvt/orders/-orderId-/invoice) endpoint to generate a return invoice. \r\n\r\n- **Incomplete orders:** [Incomplete orders](https://help.vtex.com/en/tutorial/how-incomplete-orders-work--tutorials_294) cannot be canceled. \r\n\r\n## Declining order cancelation \r\n\r\nThe order flow has a cancellation window (grace period) in which the customer can automatically cancel the order. Except for that period, the seller can [decline an order cancellation request](https://help.vtex.com/en/tutorial/declining-order-cancelation--F2n0h1TeQ5td540Gjyff4), regardless of whether the customer or the marketplace initiated it. \r\n\r\nFor more information, see [Order canceling improvements](https://developers.vtex.com/docs/guides/order-canceling-improvements). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| OMS | OMS access | **Cancel order** | \r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| OMS - Full access | Cancel order |\r\n| IntegrationProfile - Fulfillment Oms | Cancel order |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm). \r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
34071
+
"operationId": "CancelOrder",
34072
+
"parameters": [
34073
+
{
34074
+
"name": "Accept",
34075
+
"in": "header",
34076
+
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
34077
+
"required": true,
34078
+
"style": "simple",
34079
+
"schema": {
34080
+
"type": "string",
34081
+
"default": "application/json"
34082
+
}
34083
+
},
34084
+
{
34085
+
"name": "Content-Type",
34086
+
"in": "header",
34087
+
"description": "Describes the type of the content being sent.",
34088
+
"required": true,
34089
+
"style": "simple",
34090
+
"schema": {
34091
+
"type": "string",
34092
+
"default": "application/json"
34093
+
}
34094
+
},
34095
+
{
34096
+
"name": "orderId",
34097
+
"in": "path",
34098
+
"description": "ID that identifies the order in the seller.",
34099
+
"example": "1172452900788-01",
34100
+
"required": true,
34101
+
"style": "simple",
34102
+
"schema": {
34103
+
"type": "string",
34104
+
"example": "1172452900788-01"
34105
+
}
34106
+
}
34107
+
],
34108
+
"requestBody": {
34109
+
"content": {
34110
+
"application/json": {
34111
+
"schema": {
34112
+
"type": "object",
34113
+
"properties": {
34114
+
"reason": {
34115
+
"type": "string",
34116
+
"description": "Reason for cancelling the order.",
34117
+
"example": "Unexpected stock shortage"
34118
+
},
34119
+
"requestedByUser": {
34120
+
"type": "boolean",
34121
+
"description": "If requested by the user",
34122
+
"example": "User canceled the order "
34123
+
}
34124
+
}
34125
+
}
34126
+
}
34127
+
}
34128
+
},
34129
+
"responses": {
34130
+
"200": {
34131
+
"description": "OK",
34132
+
"content": {
34133
+
"application/json": {
34134
+
"schema": {
34135
+
"type": "object",
34136
+
"properties": {
34137
+
"date": {
34138
+
"type": "string",
34139
+
"description": "Date and time when the notification was received."
34140
+
},
34141
+
"orderId": {
34142
+
"type": "string",
34143
+
"description": "Identification of the order in the seller."
34144
+
},
34145
+
"receipt": {
34146
+
"type": "string",
34147
+
"description": "Protocol code generated by the update. It may be `null`."
34148
+
}
34149
+
}
34150
+
},
34151
+
"example": {
34152
+
"date": "2024-02-07T15:22:56.7612218-02:00",
34153
+
"orderId": "123543123",
34154
+
"receipt": "38e0e47da2934847b489216d208cfd91"
34155
+
}
34156
+
}
34157
+
}
34158
+
},
34159
+
"429": {
34160
+
"description": "Too many requests."
34161
+
},
34162
+
"403": {
34163
+
"description": "The credentials are not enabled to access the service."
0 commit comments