From d0b94d047306ac81c8aa50b7f488c9af0f76606e Mon Sep 17 00:00:00 2001 From: Alex Phelps Date: Thu, 23 Jan 2025 18:51:46 +0700 Subject: [PATCH] update admin api spec --- static/api/admin/2023-02-10.yaml | 63 ++++++++++++++ static/api/admin/2024-04-01.yaml | 136 ------------------------------- static/api/admin/unstable.yaml | 36 ++++++-- 3 files changed, 94 insertions(+), 141 deletions(-) diff --git a/static/api/admin/2023-02-10.yaml b/static/api/admin/2023-02-10.yaml index eb06986..37b939e 100644 --- a/static/api/admin/2023-02-10.yaml +++ b/static/api/admin/2023-02-10.yaml @@ -10970,6 +10970,69 @@ paths: - fulfillment_orders:read tags: - fulfillment + /fulfillment-orders/{id}/available-locations/: + get: + description: Retrieve available locations for a Fulfillment Order. + operationId: availableLocationsRetrieve + parameters: + - description: A unique integer value identifying this fulfillment order. + in: path + name: id + required: true + schema: + type: integer + - in: header + name: X-29next-API-Version + required: true + schema: + default: '2023-02-10' + enum: + - '2023-02-10' + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AvailableLocationFulfillmentOrder' + description: '' + security: + - oauth2: + - fulfillment_orders:read + tags: + - fulfillment + /fulfillment-orders/{id}/cancel/: + post: + description: Cancel fulfillment order + operationId: fulfillmentOrdersCancel + parameters: + - description: A unique integer value identifying this fulfillment order. + in: path + name: id + required: true + schema: + type: integer + - in: header + name: X-29next-API-Version + required: true + schema: + default: '2023-02-10' + enum: + - '2023-02-10' + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FulfillmentOrderCancelResponse' + description: '' + security: + - oauth2: + - fulfillment_service:write + - fulfillment_orders:write + tags: + - fulfillment /fulfillment-orders/{id}/cancellation-request/: post: description: Sends a fulfillment cancellation request to the fulfillment service. diff --git a/static/api/admin/2024-04-01.yaml b/static/api/admin/2024-04-01.yaml index 7e1c3b2..721de2b 100644 --- a/static/api/admin/2024-04-01.yaml +++ b/static/api/admin/2024-04-01.yaml @@ -2515,9 +2515,6 @@ components: * `cancel_rejected` - Cancel Rejected - * `closed` - Closed' - * `cancel_rejected` - Cancel Rejected - * `closed` - Closed' enum: - pending @@ -2528,10 +2525,8 @@ components: - cancel_accepted - cancel_rejected - closed - - closed type: string x-spec-enum-id: 5e87a3d9cb8f7ccc - x-spec-enum-id: 5e87a3d9cb8f7ccc shipping_address: oneOf: - $ref: '#/components/schemas/FulfillmentShippingAddress' @@ -2581,16 +2576,6 @@ components: - new_fulfillment_order - original_fulfillment_order type: object - FulfillmentOrderCancelResponse: - properties: - new_fulfillment_order: - $ref: '#/components/schemas/FulfillmentOrder' - original_fulfillment_order: - $ref: '#/components/schemas/FulfillmentOrder' - required: - - new_fulfillment_order - - original_fulfillment_order - type: object FulfillmentOrderLine: properties: currency: @@ -3211,9 +3196,6 @@ components: * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' - * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' enum: - not_required @@ -3223,10 +3205,8 @@ components: - processing - fulfilled - incomplete - - incomplete type: string x-spec-enum-id: f7a016fc10fb8390 - x-spec-enum-id: f7a016fc10fb8390 fulfillments: items: $ref: '#/components/schemas/FulfillmentResponse' @@ -3742,9 +3722,6 @@ components: * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' - * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' enum: - not_required @@ -3754,10 +3731,8 @@ components: - processing - fulfilled - incomplete - - incomplete type: string x-spec-enum-id: f7a016fc10fb8390 - x-spec-enum-id: f7a016fc10fb8390 is_test: readOnly: true type: boolean @@ -4128,9 +4103,6 @@ components: * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' - * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' enum: - not_required @@ -4140,10 +4112,8 @@ components: - processing - fulfilled - incomplete - - incomplete type: string x-spec-enum-id: f7a016fc10fb8390 - x-spec-enum-id: f7a016fc10fb8390 fulfillments: items: $ref: '#/components/schemas/Fulfillment' @@ -5307,9 +5277,6 @@ components: * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' - * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' enum: - not_required @@ -5319,10 +5286,8 @@ components: - processing - fulfilled - incomplete - - incomplete type: string x-spec-enum-id: f7a016fc10fb8390 - x-spec-enum-id: f7a016fc10fb8390 fulfillments: items: $ref: '#/components/schemas/Fulfillment' @@ -8697,9 +8662,6 @@ components: * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' - * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' enum: - not_required @@ -8709,10 +8671,8 @@ components: - processing - fulfilled - incomplete - - incomplete type: string x-spec-enum-id: f7a016fc10fb8390 - x-spec-enum-id: f7a016fc10fb8390 fulfillments: items: $ref: '#/components/schemas/Fulfillment' @@ -10010,7 +9970,6 @@ paths: - fulfillment_unrequested type: string x-spec-enum-id: 5e87a3d9cb8f7ccc - x-spec-enum-id: 5e87a3d9cb8f7ccc - description: YYYY-MM-DD in: query name: date_created_from @@ -10991,9 +10950,6 @@ paths: * `cancel_rejected` - Cancel Rejected - * `closed` - Closed' - * `cancel_rejected` - Cancel Rejected - * `closed` - Closed' explode: true in: query @@ -11006,13 +10962,11 @@ paths: - cancel_rejected - cancel_requested - closed - - closed - pending - rejected - requested type: string x-spec-enum-id: 5e87a3d9cb8f7ccc - x-spec-enum-id: 5e87a3d9cb8f7ccc type: array style: form - description: Fulfillment Order Id @@ -11100,38 +11054,6 @@ paths: - fulfillment_orders:read tags: - fulfillment - /fulfillment-orders/{id}/cancel/: - post: - description: Cancel fulfillment order - operationId: fulfillmentOrdersCancel - parameters: - - description: A unique integer value identifying this fulfillment order. - in: path - name: id - required: true - schema: - type: integer - - in: header - name: X-29next-API-Version - required: true - schema: - default: '2024-04-01' - enum: - - '2024-04-01' - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FulfillmentOrderCancelResponse' - description: '' - security: - - oauth2: - - fulfillment_service:write - - fulfillment_orders:write - tags: - - fulfillment /fulfillment-orders/{id}/available-locations/: get: description: Retrieve available locations for a Fulfillment Order. @@ -11410,49 +11332,6 @@ paths: - fulfillment_orders:write tags: - fulfillment - /fulfillment-orders/{id}/close/: - post: - description: Marks an processing fulfillment order as incomplete - operationId: fulfillmentOrdersClose - parameters: - - description: A unique integer value identifying this fulfillment order. - in: path - name: id - required: true - schema: - type: integer - - in: header - name: X-29next-API-Version - required: true - schema: - default: '2024-04-01' - enum: - - '2024-04-01' - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CloseFulfillmentOrder' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/CloseFulfillmentOrder' - multipart/form-data: - schema: - $ref: '#/components/schemas/CloseFulfillmentOrder' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FulfillmentOrder' - description: '' - security: - - oauth2: - - fulfillment_service:write - - fulfillment_orders:write - tags: - - fulfillment /fulfillment-orders/{id}/fulfillment-request/: post: description: Sends a fulfillment request to the fulfillment service of a fulfillment @@ -12634,9 +12513,6 @@ paths: * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' - * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' explode: true in: query @@ -12646,7 +12522,6 @@ paths: enum: - fulfilled - incomplete - - incomplete - not_required - on_hold - partially_fulfilled @@ -12655,7 +12530,6 @@ paths: - unfulfilled type: string x-spec-enum-id: 732a013686f682ba - x-spec-enum-id: 732a013686f682ba type: array style: form - description: 'Delivery Status @@ -19625,9 +19499,6 @@ webhooks: * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' - * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' enum: - not_required @@ -19637,10 +19508,8 @@ webhooks: - processing - fulfilled - incomplete - - incomplete type: string x-spec-enum-id: f7a016fc10fb8390 - x-spec-enum-id: f7a016fc10fb8390 fulfillments: items: properties: @@ -21194,9 +21063,6 @@ webhooks: * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' - * `fulfilled` - Fulfilled - * `incomplete` - Incomplete' enum: - not_required @@ -21206,10 +21072,8 @@ webhooks: - processing - fulfilled - incomplete - - incomplete type: string x-spec-enum-id: f7a016fc10fb8390 - x-spec-enum-id: f7a016fc10fb8390 fulfillments: items: properties: diff --git a/static/api/admin/unstable.yaml b/static/api/admin/unstable.yaml index a88bf54..492b4f6 100644 --- a/static/api/admin/unstable.yaml +++ b/static/api/admin/unstable.yaml @@ -599,11 +599,6 @@ components: message: type: string type: object - CloseFulfillmentOrder: - properties: - message: - type: string - type: object ContactAddress: properties: city: @@ -11059,6 +11054,37 @@ paths: - fulfillment_orders:read tags: - fulfillment + /fulfillment-orders/{id}/available-locations/: + get: + description: Retrieve available locations for a Fulfillment Order. + operationId: availableLocationsRetrieve + parameters: + - description: A unique integer value identifying this fulfillment order. + in: path + name: id + required: true + schema: + type: integer + - in: header + name: X-29next-API-Version + required: true + schema: + default: unstable + enum: + - unstable + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AvailableLocationFulfillmentOrder' + description: '' + security: + - oauth2: + - fulfillment_orders:read + tags: + - fulfillment /fulfillment-orders/{id}/cancel/: post: description: Cancel fulfillment order