From bc57228afc29f9cea9bbb4036743e1437132844b Mon Sep 17 00:00:00 2001 From: Vikesh Inbasekharan Date: Mon, 30 Mar 2026 14:44:26 -0500 Subject: [PATCH 1/2] PRICE-2642 - Add 503 service unavailable details in DELETE price list and price records endpoints --- reference/price_lists.v3.yml | 74 ++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/reference/price_lists.v3.yml b/reference/price_lists.v3.yml index f64373028..50c61930b 100644 --- a/reference/price_lists.v3.yml +++ b/reference/price_lists.v3.yml @@ -481,6 +481,18 @@ paths: properties: {} additionalProperties: true nullable: true + '503': + description: Service temporarily unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableError' + example: + code: SERVICE_DEGRADED + message: Service temporarily unavailable + details: "We're unable to process your request right now, please retry later" + retry_after_seconds: 30 + timestamp: "2024-01-01T00:00:00.000Z" '/pricelists/{price_list_id}': parameters: - $ref: '#/components/parameters/Accept' @@ -755,6 +767,18 @@ paths: responses: '204': description: Action has been enacted and no further information is to be supplied. `null` is returned. + '503': + description: Service temporarily unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableError' + example: + code: SERVICE_DEGRADED + message: Service temporarily unavailable + details: "We're unable to process your request right now, please retry later" + retry_after_seconds: 30 + timestamp: "2024-01-01T00:00:00.000Z" '/pricelists/records': parameters: - $ref: '#/components/parameters/Accept' @@ -1934,6 +1958,18 @@ paths: instance: type: string description: No-content response for the BigCommerce API. + '503': + description: Service temporarily unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableError' + example: + code: SERVICE_DEGRADED + message: Service temporarily unavailable + details: "We're unable to process your request right now, please retry later" + retry_after_seconds: 30 + timestamp: "2024-01-01T00:00:00.000Z" '/pricelists/{price_list_id}/records/{variant_id}': parameters: - $ref: '#/components/parameters/Accept' @@ -2792,6 +2828,18 @@ paths: '204': description: '' content: {} + '503': + description: Service temporarily unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableError' + example: + code: SERVICE_DEGRADED + message: Service temporarily unavailable + details: "We're unable to process your request right now, please retry later" + retry_after_seconds: 30 + timestamp: "2024-01-01T00:00:00.000Z" '/pricelists/assignments': parameters: - $ref: '#/components/parameters/Accept' @@ -3339,6 +3387,32 @@ components: properties: {} additionalProperties: true description: Response metadata. + ServiceUnavailableError: + type: object + title: Service Unavailable Error + description: Returned when the service is temporarily unavailable. + properties: + code: + type: string + description: Error code identifying the type of failure. + example: SERVICE_DEGRADED + message: + type: string + description: Human-readable summary of the error. + example: Service temporarily unavailable + details: + type: string + description: Additional information about the error. + example: "We're unable to process your request right now, please retry later" + retry_after_seconds: + type: integer + description: Number of seconds to wait before retrying the request. + example: 30 + timestamp: + type: string + format: date-time + description: ISO 8601 timestamp of when the error occurred. + example: "2024-01-01T00:00:00.000Z" ErrorResponse: allOf: - type: object From 1abfab8064b4adeeb0e330811b9eaeb147bc682f Mon Sep 17 00:00:00 2001 From: Vikesh Inbasekharan Date: Mon, 30 Mar 2026 15:13:32 -0500 Subject: [PATCH 2/2] PRICE-2642 - Modifying the response error wrapper --- reference/price_lists.v3.yml | 90 ++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 41 deletions(-) diff --git a/reference/price_lists.v3.yml b/reference/price_lists.v3.yml index 50c61930b..b9ff1640b 100644 --- a/reference/price_lists.v3.yml +++ b/reference/price_lists.v3.yml @@ -488,11 +488,12 @@ paths: schema: $ref: '#/components/schemas/ServiceUnavailableError' example: - code: SERVICE_DEGRADED - message: Service temporarily unavailable - details: "We're unable to process your request right now, please retry later" - retry_after_seconds: 30 - timestamp: "2024-01-01T00:00:00.000Z" + error: + code: SERVICE_DEGRADED + message: Service temporarily unavailable + details: "We're unable to process your request right now, please retry later" + retry_after_seconds: 30 + timestamp: "2024-01-01T00:00:00.000Z" '/pricelists/{price_list_id}': parameters: - $ref: '#/components/parameters/Accept' @@ -774,11 +775,12 @@ paths: schema: $ref: '#/components/schemas/ServiceUnavailableError' example: - code: SERVICE_DEGRADED - message: Service temporarily unavailable - details: "We're unable to process your request right now, please retry later" - retry_after_seconds: 30 - timestamp: "2024-01-01T00:00:00.000Z" + error: + code: SERVICE_DEGRADED + message: Service temporarily unavailable + details: "We're unable to process your request right now, please retry later" + retry_after_seconds: 30 + timestamp: "2024-01-01T00:00:00.000Z" '/pricelists/records': parameters: - $ref: '#/components/parameters/Accept' @@ -1965,11 +1967,12 @@ paths: schema: $ref: '#/components/schemas/ServiceUnavailableError' example: - code: SERVICE_DEGRADED - message: Service temporarily unavailable - details: "We're unable to process your request right now, please retry later" - retry_after_seconds: 30 - timestamp: "2024-01-01T00:00:00.000Z" + error: + code: SERVICE_DEGRADED + message: Service temporarily unavailable + details: "We're unable to process your request right now, please retry later" + retry_after_seconds: 30 + timestamp: "2024-01-01T00:00:00.000Z" '/pricelists/{price_list_id}/records/{variant_id}': parameters: - $ref: '#/components/parameters/Accept' @@ -2835,11 +2838,12 @@ paths: schema: $ref: '#/components/schemas/ServiceUnavailableError' example: - code: SERVICE_DEGRADED - message: Service temporarily unavailable - details: "We're unable to process your request right now, please retry later" - retry_after_seconds: 30 - timestamp: "2024-01-01T00:00:00.000Z" + error: + code: SERVICE_DEGRADED + message: Service temporarily unavailable + details: "We're unable to process your request right now, please retry later" + retry_after_seconds: 30 + timestamp: "2024-01-01T00:00:00.000Z" '/pricelists/assignments': parameters: - $ref: '#/components/parameters/Accept' @@ -3392,27 +3396,31 @@ components: title: Service Unavailable Error description: Returned when the service is temporarily unavailable. properties: - code: - type: string - description: Error code identifying the type of failure. - example: SERVICE_DEGRADED - message: - type: string - description: Human-readable summary of the error. - example: Service temporarily unavailable - details: - type: string - description: Additional information about the error. - example: "We're unable to process your request right now, please retry later" - retry_after_seconds: - type: integer - description: Number of seconds to wait before retrying the request. - example: 30 - timestamp: - type: string - format: date-time - description: ISO 8601 timestamp of when the error occurred. - example: "2024-01-01T00:00:00.000Z" + error: + type: object + description: Top-level error wrapper. + properties: + code: + type: string + description: Error code identifying the type of failure. + example: SERVICE_DEGRADED + message: + type: string + description: Human-readable summary of the error. + example: Service temporarily unavailable + details: + type: string + description: Additional information about the error. + example: "We're unable to process your request right now, please retry later" + retry_after_seconds: + type: integer + description: Number of seconds to wait before retrying the request. + example: 30 + timestamp: + type: string + format: date-time + description: ISO 8601 timestamp of when the error occurred. + example: "2024-01-01T00:00:00.000Z" ErrorResponse: allOf: - type: object