From 2e9b5282b7e2da94f887f850da4c9ad279fb4b33 Mon Sep 17 00:00:00 2001 From: sraj Date: Fri, 15 Dec 2023 07:25:03 -0800 Subject: [PATCH 1/3] Update OpenAPI 3.0 Specifications --- openapi/billing_subscriptions_v1.json | 305 +++--- openapi/catalogs_products_v1.json | 229 +++-- openapi/checkout_orders_v1.json | 258 +++-- openapi/checkout_orders_v2.json | 356 +++++-- openapi/customer_disputes_v1.json | 666 +++++++------ openapi/customer_partner_referrals_v1.json | 942 ++++++++++++++++-- openapi/customer_partner_referrals_v2.json | 219 ++-- openapi/invoicing_v1.json | 473 +++++++-- openapi/invoicing_v2.json | 254 +++-- openapi/notifications_webhooks_v1.json | 522 +++++++--- ...experience_web_experience_profiles_v1.json | 397 +++++--- openapi/payments_payment_v1.json | 549 ++++++---- openapi/payments_payment_v2.json | 283 ++++-- openapi/payments_payouts_batch_v1.json | 771 ++++++++++---- openapi/reporting_transactions_v1.json | 210 ++-- openapi/shipping_shipment_tracking_v1.json | 471 +++++---- openapi/vault_payment_tokens_v3.json | 227 +++-- 17 files changed, 4944 insertions(+), 2188 deletions(-) diff --git a/openapi/billing_subscriptions_v1.json b/openapi/billing_subscriptions_v1.json index 73d8922..e2e5e1c 100644 --- a/openapi/billing_subscriptions_v1.json +++ b/openapi/billing_subscriptions_v1.json @@ -266,9 +266,6 @@ }, { "$ref": "#/components/parameters/total_required" - }, - { - "$ref": "#/components/parameters/statuses" } ], "security": [ @@ -370,9 +367,6 @@ }, { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/fields" } ], "security": [ @@ -2158,11 +2152,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/patch_request" - }, - "examples": { - "0": { - "$ref": "#/components/examples/patch_request" - } } } } @@ -2174,7 +2163,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "/v1/oauth2/token", + "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", "scopes": { "https://uri.paypal.com/services/subscriptions": "Manage plan & subscription" } @@ -2189,8 +2178,7 @@ "description": "The media type. Required for operations with a request body. The value is `application/`, where the `format` is `json`.", "required": true, "schema": { - "type": "string", - "default": "application/json" + "type": "string" } }, "prefer": { @@ -2226,12 +2214,12 @@ "plan_ids": { "name": "plan_ids", "in": "query", - "description": "Filters the response by list of plan IDs. Filter supports upto 70 plan IDs. URLs should not exceed a length of 2000 characters.", + "description": "Filters the response by list of plan IDs. Filter supports upto 10 plan IDs.", "required": false, "schema": { "type": "string", "minimum": 3, - "maximum": 1890 + "maximum": 270 } }, "page_size": { @@ -2252,7 +2240,7 @@ "schema": { "type": "integer", "minimum": 1, - "maximum": 10000000, + "maximum": 100000, "default": 1 } }, @@ -2265,23 +2253,6 @@ "default": false } }, - "statuses": { - "name": "statuses", - "in": "query", - "description": "Filters the response by list of subscription statuses.", - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 70, - "pattern": "^[A-Z_,]+$", - "enum": [ - "ACTIVE", - "SUSPENDED", - "CANCELLED", - "EXPIRED" - ] - } - }, "id": { "name": "id", "in": "path", @@ -2343,7 +2314,7 @@ "schemas": { "400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2371,7 +2342,7 @@ }, "401": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2399,7 +2370,7 @@ }, "403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2427,7 +2398,7 @@ }, "404": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2455,7 +2426,7 @@ }, "422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2850,10 +2821,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -2867,7 +2880,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2877,17 +2890,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -2901,7 +2918,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2911,17 +2928,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -2935,7 +2956,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2945,17 +2966,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -2969,7 +2994,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2979,17 +3004,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -3003,7 +3032,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3013,17 +3042,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -3037,7 +3070,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3047,17 +3080,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -3071,7 +3108,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3081,17 +3118,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -3109,26 +3150,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -3146,10 +3193,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -3628,7 +3679,7 @@ }, "plans.create-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -3800,7 +3851,7 @@ }, "plans.patch-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -3913,7 +3964,7 @@ }, "plans.patch-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -3958,7 +4009,7 @@ }, "plans.activate-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -4003,7 +4054,7 @@ }, "plans.deactivate-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -4087,7 +4138,7 @@ }, "plans.update-pricing-schemes-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -4132,7 +4183,7 @@ }, "plans.update-pricing-schemes-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -5473,7 +5524,7 @@ }, "subscriptions.create-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -5637,7 +5688,7 @@ }, "subscriptions.create-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -5886,7 +5937,7 @@ }, "subscriptions.patch-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6084,7 +6135,7 @@ }, "subscriptions.patch-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6413,7 +6464,7 @@ }, "subscriptions.revise-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6526,7 +6577,7 @@ }, "subscriptions.revise-404": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6554,7 +6605,7 @@ }, "subscriptions.revise-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6768,7 +6819,7 @@ }, "subscriptions.suspend-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6796,7 +6847,7 @@ }, "subscriptions.suspend-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6857,7 +6908,7 @@ }, "subscriptions.cancel-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6885,7 +6936,7 @@ }, "subscriptions.cancel-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6943,7 +6994,7 @@ }, "subscriptions.activate-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6971,7 +7022,7 @@ }, "subscriptions.activate-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -7239,7 +7290,7 @@ }, "subscriptions.capture-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -7318,7 +7369,7 @@ }, "subscriptions.capture-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -7504,7 +7555,7 @@ }, "subscriptions.transactions-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ diff --git a/openapi/catalogs_products_v1.json b/openapi/catalogs_products_v1.json index 1cc3abb..911f1d0 100644 --- a/openapi/catalogs_products_v1.json +++ b/openapi/catalogs_products_v1.json @@ -539,8 +539,7 @@ "description": "The media type. Required for operations with a request body. The value is `application/`, where `format` is `json`.", "required": true, "schema": { - "type": "string", - "default": "application/json" + "type": "string" } }, "prefer": { @@ -618,7 +617,7 @@ "schemas": { "400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -646,7 +645,7 @@ }, "401": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -674,7 +673,7 @@ }, "403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -702,7 +701,7 @@ }, "404": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -730,7 +729,7 @@ }, "422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -853,10 +852,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -870,7 +911,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -880,17 +921,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -904,7 +949,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -914,17 +959,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -938,7 +987,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -948,17 +997,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -972,7 +1025,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -982,17 +1035,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -1006,7 +1063,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1016,17 +1073,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -1040,7 +1101,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1050,17 +1111,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -1074,7 +1139,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1084,17 +1149,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -1112,26 +1181,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -1149,10 +1224,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -1871,7 +1950,7 @@ }, "products.create-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2026,7 +2105,7 @@ }, "products.patch-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2122,7 +2201,7 @@ }, "products.patch-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ diff --git a/openapi/checkout_orders_v1.json b/openapi/checkout_orders_v1.json index 71fb507..c76ba98 100644 --- a/openapi/checkout_orders_v1.json +++ b/openapi/checkout_orders_v1.json @@ -28,7 +28,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -78,7 +85,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -109,7 +123,14 @@ "description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body. If the order is already paid, the order cannot be canceled and the request returns the HTTP `422 Unprocessable Entity` status code with the message, `This order is in progress`." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -167,7 +188,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -276,18 +304,6 @@ } } }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -352,10 +368,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -369,7 +427,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -379,17 +437,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -403,7 +465,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -413,17 +475,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -437,7 +503,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -447,17 +513,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -471,7 +541,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -481,17 +551,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -505,7 +579,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -515,17 +589,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -539,7 +617,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -549,17 +627,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -573,7 +655,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -583,17 +665,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -611,26 +697,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -648,10 +740,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { diff --git a/openapi/checkout_orders_v2.json b/openapi/checkout_orders_v2.json index 9d19734..1773049 100644 --- a/openapi/checkout_orders_v2.json +++ b/openapi/checkout_orders_v2.json @@ -1095,7 +1095,7 @@ "name": "PayPal-Request-Id", "in": "header", "description": "The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager.", - "required": true, + "required": false, "schema": { "type": "string", "minLength": 1, @@ -1144,13 +1144,13 @@ "type": "string", "minLength": 1, "maxLength": 255, - "default": "application/json" + "pattern": "^[A-Za-z0-9/+-]+$" } }, "id": { "name": "id", "in": "path", - "description": "The ID of the order for which to update payment details.", + "description": "The ID of the order that the tracking information is associated with.", "required": true, "schema": { "type": "string", @@ -1206,7 +1206,7 @@ "schemas": { "400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1387,7 +1387,7 @@ }, "401": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1415,7 +1415,7 @@ }, "403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1477,7 +1477,7 @@ }, "404": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1505,7 +1505,7 @@ }, "422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -3260,10 +3260,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -3277,7 +3319,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3287,17 +3329,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -3311,7 +3357,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3321,17 +3367,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -3345,7 +3395,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3355,17 +3405,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -3379,7 +3433,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3389,17 +3443,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -3413,7 +3471,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3423,17 +3481,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -3447,7 +3509,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3457,17 +3519,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -3481,7 +3547,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -3491,17 +3557,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -3519,26 +3589,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -3556,10 +3632,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -4112,10 +4192,12 @@ "shipping_type": { "type": "string", "title": "Shipping Type", - "description": "The method by which the payer wants to get their items.", + "description": "A classification for the method of purchase fulfillment.", "enum": [ "SHIPPING", - "PICKUP" + "PICKUP", + "PICKUP_IN_STORE", + "PICKUP_FROM_PERSON" ] }, "shipping_option": { @@ -4134,7 +4216,7 @@ "maxLength": 127 }, "type": { - "description": "The method by which the payer wants to get their items.", + "description": "A classification for the method of purchase fulfillment.", "$ref": "#/components/schemas/shipping_type" }, "amount": { @@ -4162,14 +4244,16 @@ "$ref": "#/components/schemas/name" }, "type": { - "description": "The method by which the payer wants to get their items from the payee e.g shipping, in-person pickup. Either type or options but not both may be present.", + "description": "A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.", "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[0-9A-Z_]+$", "enum": [ "SHIPPING", - "PICKUP_IN_PERSON" + "PICKUP_IN_PERSON", + "PICKUP_IN_STORE", + "PICKUP_FROM_PERSON" ] }, "options": { @@ -4720,11 +4804,17 @@ "properties": { "return_url": { "description": "The URL where the customer will be redirected upon successfully completing the 3DS challenge.", + "type": "string", + "minLength": 10, + "maxLength": 4000, "format": "uri", "$ref": "#/components/schemas/url" }, "cancel_url": { "description": "The URL where the customer will be redirected upon cancelling the 3DS challenge.", + "type": "string", + "minLength": 10, + "maxLength": 4000, "format": "uri", "$ref": "#/components/schemas/url" } @@ -4921,6 +5011,20 @@ "country_code" ] }, + "paypal_wallet_customer": { + "type": "object", + "title": "Customer information based on PayPal's system of record", + "description": "The details about a customer in PayPal's system of record.", + "allOf": [ + { + "$ref": "#/components/schemas/customer" + }, + { + "properties": {} + } + ] + }, + "vault_owner_id": {}, "vault_paypal_wallet_base": { "type": "object", "title": "Vaulted PayPal Wallet Common Attributes", @@ -4966,6 +5070,9 @@ "PLATFORM" ] }, + "owner_id": { + "$ref": "#/components/schemas/vault_owner_id" + }, "customer_type": { "type": "string", "description": "The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.", @@ -4996,7 +5103,7 @@ "description": "Additional attributes associated with the use of this PayPal Wallet.", "properties": { "customer": { - "$ref": "#/components/schemas/customer" + "$ref": "#/components/schemas/paypal_wallet_customer" }, "vault": { "description": "Attributes used to provide the instructions during vaulting of the PayPal Wallet.", @@ -5223,7 +5330,7 @@ "format": "ppaas_common_email_address_v2", "minLength": 3, "maxLength": 254, - "pattern": "^.+@[^\"\\-].+$" + "pattern": "^(?:[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$" }, "ip_address": { "type": "string", @@ -5266,7 +5373,7 @@ "properties": { "auth_code": { "type": "string", - "description": "6-digit code used to authenticate a consumer within BLIK.", + "description": "The 6-digit code used to authenticate a consumer within BLIK.", "minLength": 6, "maxLength": 6, "pattern": "^[0-9]{6}$" @@ -5283,7 +5390,7 @@ "properties": { "auth_code": { "type": "string", - "description": "6-digit code used to authenticate a consumer within BLIK.", + "description": "The 6-digit code used to authenticate a consumer within BLIK.", "minLength": 6, "maxLength": 6, "pattern": "^[0-9]{6}$" @@ -6395,6 +6502,26 @@ "national_number" ] }, + "paypal_wallet_vault_response": { + "type": "object", + "title": "Saved PayPal Wallet Payment Source Response", + "description": "The details about a saved PayPal Wallet payment source.", + "allOf": [ + { + "$ref": "#/components/schemas/vault_response" + }, + { + "properties": { + "customer": { + "$ref": "#/components/schemas/paypal_wallet_customer" + }, + "owner_id": { + "$ref": "#/components/schemas/vault_owner_id" + } + } + } + ] + }, "cobranded_card": { "type": "object", "title": "cobranded card object", @@ -6428,7 +6555,7 @@ "description": "Additional attributes associated with the use of a PayPal Wallet.", "properties": { "vault": { - "$ref": "#/components/schemas/vault_response" + "$ref": "#/components/schemas/paypal_wallet_vault_response" }, "cobranded_cards": { "type": "array", @@ -6455,6 +6582,18 @@ "readOnly": true, "$ref": "#/components/schemas/account_id-2" }, + "account_status": { + "type": "string", + "description": "The account status indicates whether the buyer has verified the financial details associated with their PayPal account.", + "readOnly": true, + "minLength": 1, + "maxLength": 255, + "pattern": "^[A-Z_]+$", + "enum": [ + "VERIFIED", + "UNVERIFIED" + ] + }, "name": { "description": "The name of the PayPal account holder. Supports only the `given_name` and `surname` properties.", "$ref": "#/components/schemas/name-2" @@ -7893,7 +8032,7 @@ }, "orders.patch-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -8057,7 +8196,7 @@ }, "orders.patch-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -8766,7 +8905,7 @@ }, "orders.confirm-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -8879,7 +9018,7 @@ }, "orders.confirm-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -9868,6 +10007,23 @@ ] } } + }, + { + "title": "TRANSACTION_LIMIT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": [ + "TRANSACTION_LIMIT_EXCEEDED" + ] + }, + "description": { + "type": "string", + "enum": [ + "Total payment amount exceeded transaction limit." + ] + } + } } ] } @@ -9941,7 +10097,7 @@ }, "orders.authorize-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -10054,7 +10210,7 @@ }, "orders.authorize-403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -10116,7 +10272,7 @@ }, "orders.authorize-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -11191,7 +11347,7 @@ }, "orders.capture-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -11287,7 +11443,7 @@ }, "orders.capture-403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -11366,7 +11522,7 @@ }, "orders.capture-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -13997,7 +14153,7 @@ }, "orders.track.create-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -14076,7 +14232,7 @@ }, "orders.track.create-403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -14104,7 +14260,7 @@ }, "orders.track.create-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -14183,7 +14339,7 @@ }, "orders.trackers.patch-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -14296,7 +14452,7 @@ }, "orders.trackers.patch-403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -14324,7 +14480,7 @@ }, "orders.trackers.patch-404": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -14352,7 +14508,7 @@ }, "orders.trackers.patch-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ diff --git a/openapi/customer_disputes_v1.json b/openapi/customer_disputes_v1.json index 931f402..469b661 100644 --- a/openapi/customer_disputes_v1.json +++ b/openapi/customer_disputes_v1.json @@ -33,7 +33,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -52,23 +59,11 @@ { "$ref": "#/components/parameters/dispute_state" }, - { - "$ref": "#/components/parameters/dispute_flows" - }, - { - "$ref": "#/components/parameters/create_time_before" - }, - { - "$ref": "#/components/parameters/create_time_after" - }, { "$ref": "#/components/parameters/update_time_before" }, { "$ref": "#/components/parameters/update_time_after" - }, - { - "$ref": "#/components/parameters/search_text" } ], "security": [ @@ -130,7 +125,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -218,7 +220,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -230,7 +239,28 @@ } ], "requestBody": { - "$ref": "#/components/requestBodies/patch_request" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/patch_request" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/patch_request" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/patch_request" + } + }, + "multipart/mixed": { + "schema": { + "$ref": "#/components/schemas/patch_request" + } + } + } }, "security": [ { @@ -271,7 +301,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -334,7 +371,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -392,7 +436,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -478,7 +529,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -582,7 +640,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -687,7 +752,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -791,7 +863,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -882,7 +961,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -996,7 +1082,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -1095,7 +1188,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -1194,7 +1294,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -1290,7 +1397,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -1397,35 +1511,6 @@ ], "components": { "requestBodies": { - "patch_request": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/patch_request" - }, - "examples": { - "0": { - "$ref": "#/components/examples/patch_request" - } - } - }, - "multipart/related": { - "schema": { - "$ref": "#/components/schemas/patch_request" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/patch_request" - } - }, - "multipart/mixed": { - "schema": { - "$ref": "#/components/schemas/patch_request" - } - } - } - }, "evidences": { "content": { "multipart/form-data": { @@ -1535,55 +1620,6 @@ ] } }, - "dispute_flows": { - "name": "dispute_flows", - "in": "query", - "description": "Filters the disputes in the response by one or more dispute flows. Separate multiple values with a comma (`,`). When you specify more than one dispute flow, the response lists disputes with any of the specified dispute flows.", - "required": false, - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[0-9a-zA-Z_.]+$", - "enum": [ - "THIRD_PARTY_CLAIM", - "THIRD_PARTY_DISPUTE" - ] - }, - "minItems": 1, - "maxItems": 10 - } - }, - "create_time_before": { - "name": "create_time_before", - "in": "query", - "description": "The date and time when the dispute was created before, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.
", - "required": true, - "schema": { - "type": "string", - "format": "ppaas_date_time_v3", - "minLength": 20, - "maxLength": 64, - "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" - } - }, - "create_time_after": { - "name": "create_time_after", - "in": "query", - "description": "The date and time when the dispute was created after, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.
", - "required": true, - "schema": { - "type": "string", - "format": "ppaas_date_time_v3", - "minLength": 20, - "maxLength": 64, - "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" - } - }, "update_time_before": { "name": "update_time_before", "in": "query", @@ -1608,15 +1644,16 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" } }, - "search_text": { - "name": "search_text", - "in": "query", - "description": "The search text for which auto complete or did you mean is requested. Supported searchable fields include counter party name/email, transaction id, invoice id and dispute id.", + "id": { + "name": "id", + "in": "path", + "description": "The ID of the dispute for which to provide the supporting information.", "required": true, "schema": { "type": "string", - "minLength": 2, - "maxLength": 255 + "minLength": 1, + "maxLength": 255, + "pattern": "^[A-Za-z0-9-]+$" } }, "content_type": { @@ -1628,32 +1665,7 @@ "type": "string", "minLength": 1, "maxLength": 255, - "pattern": "\\w+\\/[-+.\\w]+", - "default": "application/json" - } - }, - "id": { - "name": "id", - "in": "path", - "description": "The ID of the dispute for which to update action details.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 2000, - "pattern": "^[A-Za-z0-9-]+$" - } - } - }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } + "pattern": "\\w+\\/[-+.\\w]+" } } }, @@ -1721,10 +1733,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -1738,7 +1792,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1748,17 +1802,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -1772,7 +1830,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1782,17 +1840,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -1806,7 +1868,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1816,17 +1878,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -1840,7 +1906,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1850,17 +1916,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -1874,7 +1944,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1884,17 +1954,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -1908,7 +1982,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1918,17 +1992,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -1942,7 +2020,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1952,17 +2030,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -1980,26 +2062,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -2017,10 +2105,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -2030,6 +2122,84 @@ "information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE" } }, + "link_description": { + "type": "object", + "title": "Link Description", + "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "type": "string", + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." + }, + "rel": { + "type": "string", + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." + }, + "method": { + "type": "string", + "description": "The HTTP method required to make the related call.", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "CONNECT", + "OPTIONS", + "PATCH" + ] + } + } + }, + "error": { + "type": "object", + "title": "Error", + "description": "The error details.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "information_link": { + "type": "string", + "description": "The information link, or URI, that shows detailed information about this error for the developer.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "An array of additional details about the error.", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "links": { + "type": "array", + "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/link_description", + "readOnly": true + } + } + }, + "required": [ + "name", + "message", + "debug_id" + ] + }, "date_time": { "type": "string", "description": "The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.
", @@ -2180,39 +2350,6 @@ "ALERT" ] }, - "link_description": { - "type": "object", - "title": "Link Description", - "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", - "required": [ - "href", - "rel" - ], - "properties": { - "href": { - "type": "string", - "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." - }, - "rel": { - "type": "string", - "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." - }, - "method": { - "type": "string", - "description": "The HTTP method required to make the related call.", - "enum": [ - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "CONNECT", - "OPTIONS", - "PATCH" - ] - } - } - }, "dispute_info": { "type": "object", "title": "Dispute Summary Information", @@ -2313,51 +2450,6 @@ } } }, - "error": { - "type": "object", - "title": "Error", - "description": "The error details.", - "properties": { - "name": { - "type": "string", - "description": "The human-readable, unique name of the error." - }, - "message": { - "type": "string", - "description": "The message that describes the error." - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true - }, - "details": { - "type": "array", - "description": "An array of additional details about the error.", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "links": { - "type": "array", - "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", - "readOnly": true, - "items": { - "$ref": "#/components/schemas/link_description", - "readOnly": true - } - } - }, - "required": [ - "name", - "message", - "debug_id" - ] - }, "buyer": { "type": "object", "title": "Customer", @@ -3018,7 +3110,7 @@ "description": "The cancellation details.", "properties": { "cancellation_date": { - "description": "The date and time of the cancellation, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "description": "The date and time of the cancellation, in [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6).", "$ref": "#/components/schemas/date_time" }, "cancellation_number": { @@ -3056,7 +3148,7 @@ "properties": { "return_time": { "$ref": "#/components/schemas/date_time", - "description": "The date and time when the product was returned, [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when the product was returned, [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6)." }, "mode": { "description": "The method that the customer used to return the product.", @@ -4183,6 +4275,7 @@ "FMX", "HELLMANN", "DHL_REFR", + "DHL_HK", "SHIP_IT_ASIA", "KERRY_ECOMMERCE", "GOJEK", @@ -4543,6 +4636,7 @@ "JOOM_LOGIS", "STRECK_TRANSPORT", "HCT_LOGISTICS", + "ZA_FASTWAY", "CARRY_FLAP", "PONY_EXPRESS", "US_OLD_DOMINION", @@ -4922,7 +5016,7 @@ "date": { "readOnly": true, "$ref": "#/components/schemas/date_time", - "description": "The date and time when the evidence was received, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when the evidence was received, in [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6)." }, "item_id": { "type": "string", @@ -4969,7 +5063,7 @@ "properties": { "offer_time": { "$ref": "#/components/schemas/date_time", - "description": "The date and time when the event occurred, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when the event occurred, in [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6)." }, "actor": { "type": "string", @@ -5113,7 +5207,7 @@ "provided_time": { "readOnly": true, "$ref": "#/components/schemas/date_time", - "description": "The date and time when the information was received, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when the information was received, in [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6)." }, "dispute_life_cycle_stage": { "readOnly": true, diff --git a/openapi/customer_partner_referrals_v1.json b/openapi/customer_partner_referrals_v1.json index 7e7c9ec..5e44d0b 100644 --- a/openapi/customer_partner_referrals_v1.json +++ b/openapi/customer_partner_referrals_v1.json @@ -23,7 +23,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "requestBody": { @@ -70,7 +77,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -105,7 +119,14 @@ "description": "A successful request returns the HTTP `201 Created` status code and a JSON response body that lists sellers. For each seller, the response shows the seller ID (`merchant_id`), the tracking ID, and [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links) to show the seller-partner information." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -145,7 +166,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -188,7 +216,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -207,6 +242,248 @@ "merchant-integration" ] } + }, + "/v1/customer/partners/{id}": { + "get": { + "summary": "Show partner information - agreements and preferences", + "description": "Shows partner information - agreements and preferences - by partner ID.", + "operationId": "partner.read", + "responses": { + "200": { + "description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows partner information.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/partner" + } + } + } + }, + "401": { + "description": "Authorization failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "404": { + "description": "The specified resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "default": { + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/country_code" + }, + { + "$ref": "#/components/parameters/product" + }, + { + "$ref": "#/components/parameters/content_type" + } + ], + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/customer/partner" + ] + } + ], + "tags": [ + "partner" + ] + }, + "post": { + "summary": "Create partner information - agreements and preferences", + "description": "Creates partner information - agreements and preferences - for the given partner.", + "operationId": "partner.create", + "responses": { + "201": { + "description": "A successful request returns the HTTP `201 Created` status code and a JSON response body that contains an array of [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links) that show the partner info.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/partner" + } + } + } + }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "401": { + "description": "Authorization failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "default": { + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/content_type" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/partner" + }, + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/customer/partner" + ] + } + ], + "tags": [ + "partner" + ] + }, + "put": { + "summary": "Update partner information - agreements and preferences", + "description": "Updates partner information - agreements and preferences - for the given partner.", + "operationId": "partner.update", + "responses": { + "204": { + "description": "The server has successfully executed the method, but there is no entity body to return." + }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "401": { + "description": "Authorization failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "404": { + "description": "The specified resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + }, + "default": { + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-2" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/content_type" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/partner" + }, + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/customer/partner" + ] + } + ], + "tags": [ + "partner" + ] + } } }, "tags": [ @@ -225,6 +502,10 @@ { "name": "cancel-onboarding", "description": "Enables you to cancel an in-progress seller onboarding." + }, + { + "name": "partner", + "description": "Enables you to create, update and read partner agreements and preferences." } ], "externalDocs": { @@ -241,6 +522,18 @@ } ], "components": { + "requestBodies": { + "partner": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/partner" + } + } + }, + "required": true + } + }, "securitySchemes": { "Oauth2": { "type": "oauth2", @@ -261,11 +554,11 @@ "partner_referral_id": { "name": "partner_referral_id", "in": "path", - "description": "Filters the links in the response by this partner referral ID.", + "description": "The ID of the partner-referrals data for which to show details.", + "required": true, "schema": { "type": "string" - }, - "required": true + } }, "partner_id": { "name": "partner_id", @@ -301,17 +594,50 @@ "schema": { "type": "string" } - } - }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } + }, + "id": { + "name": "id", + "in": "path", + "description": "The ID of the partner, which is the partner's PayPal account number. To find this ID, log in to the partner's PayPal business account. Navigate to **Profile**, click **Profile and settings**, and click **My business info**. The account number appears in the **Merchant account ID** section.", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "pattern": "^.*$" + } + }, + "country_code": { + "name": "country_code", + "in": "query", + "description": "The country code to load region preferences.", + "schema": { + "type": "string", + "minLength": 2, + "maxLength": 2, + "pattern": "^([a-zA-Z]{2})$" + } + }, + "product": { + "name": "product", + "in": "query", + "description": "The product to load region and integration preferences.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "pattern": "^.*$" + } + }, + "content_type": { + "name": "Content-type", + "in": "header", + "description": "The Content-type header MUST be described in all externally-accessible APIs.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 4000, + "pattern": "^.*$" } } }, @@ -379,10 +705,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -396,7 +764,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -406,17 +774,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -430,7 +802,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -440,17 +812,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -464,7 +840,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -474,17 +850,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -498,7 +878,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -508,17 +888,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -532,7 +916,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -542,17 +926,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -566,7 +954,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -576,17 +964,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -600,7 +992,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -610,17 +1002,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -638,26 +1034,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -675,10 +1077,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -1966,6 +2372,51 @@ } } }, + "error": { + "type": "object", + "title": "Error", + "description": "The error details.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "information_link": { + "type": "string", + "description": "The information link, or URI, that shows detailed information about this error for the developer.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "An array of additional details about the error.", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "links": { + "type": "array", + "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/link_description", + "readOnly": true + } + } + }, + "required": [ + "name", + "message", + "debug_id" + ] + }, "create_referral_data_response": { "type": "object", "title": "Create Referral Data Response", @@ -2317,6 +2768,20 @@ "type": "string", "description": "The payer ID of the seller after creation of their PayPal account." }, + "given_name": { + "type": "string", + "description": "The given name of the seller. Only available for casual sellers.", + "maxLength": 140, + "minLength": 1, + "pattern": "^[a-zA-Z ,.'-]+$" + }, + "surname": { + "type": "string", + "description": "The surname of the seller. Only available for casual sellers.", + "maxLength": 140, + "minLength": 1, + "pattern": "^[a-zA-Z ,.'-]+$" + }, "products": { "type": "array", "description": "An array of all products that are integrated with the partner for the seller.", @@ -2328,6 +2793,10 @@ "type": "boolean", "description": "Indicates whether the seller account can receive payments." }, + "legal_name": { + "type": "string", + "description": "The legal business name of the seller." + }, "primary_email_confirmed": { "type": "boolean", "description": "Indicates whether the primary email of the seller has been confirmed." @@ -2428,6 +2897,309 @@ "maxLength": 255 } } + }, + "error_details-2": { + "type": "object", + "title": "Error Details", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The name of the field that caused the error." + }, + "issue": { + "type": "string", + "description": "The reason for the error." + } + }, + "required": [ + "field", + "issue" + ] + }, + "error-2": { + "type": "object", + "title": "Error", + "description": "The error information.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error.", + "readOnly": true + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "The message that describes the error.", + "readOnly": true + }, + "information_link": { + "type": "string", + "description": "The URI to detailed information related to this error for the developer.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "An array of additional details for the error.", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/error_details-2" + } + } + }, + "required": [ + "name", + "message", + "information_link" + ] + }, + "product-integration": { + "type": "object", + "title": "Product Integration", + "description": "The required information for a partner to integrate this product.", + "properties": { + "product": { + "type": "string", + "description": "The product.", + "enum": [ + "EXPRESS_CHECKOUT", + "WEBSITE_PAYMENTS_STANDARD", + "MASS_PAYMENT", + "EMAIL_PAYMENTS", + "EBAY_CHECKOUT", + "PAYFLOW_LINK", + "PAYFLOW_PRO", + "WEBSITE_PAYMENTS_PRO_3_0", + "WEBSITE_PAYMENTS_PRO_2_0", + "VIRTUAL_TERMINAL", + "HOSTED_SOLE_SOLUTION", + "BILL_ME_LATER", + "MOBILE_EXPRESS_CHECKOUT", + "PAYPAL_HERE", + "MOBILE_IN_STORE", + "PAYPAL_STANDARD", + "MOBILE_PAYPAL_STANDARD", + "MOBILE_PAYMENT_ACCEPTANCE", + "PAYPAL_ADVANCED", + "PAYPAL_PRO", + "ENHANCED_RECURRING_PAYMENTS" + ] + }, + "integration_type": { + "type": "string", + "description": "The integration type for the product as third or first party or sellers that are onboarded through this partner.", + "enum": [ + "FIRST_PARTY", + "THIRD_PARTY" + ] + }, + "credential_type": { + "type": "string", + "description": "The credential type for a first-party integration. Required if `integration_type` is provided.", + "enum": [ + "SIGNATURE", + "CERTIFICATE", + "OAUTH_TOKEN" + ] + }, + "permissions": { + "type": "array", + "description": "An array of permissions that the partner expects that the seller has granted for a third-party integration. Different products need different permissions, so permissions also depend on the product.", + "items": { + "type": "string", + "description": "Permission given to the partner.", + "enum": [ + "EXPRESS_CHECKOUT", + "REFUND", + "DIRECT_PAYMENT", + "AUTH_CAPTURE", + "BUTTON_MANAGER", + "ACCOUNT_BALANCE", + "TRANSACTION_DETAILS", + "TRANSACTION_SEARCH", + "REFERENCE_TRANSACTION", + "RECURRING_PAYMENTS", + "BILLING_AGREEMENT", + "MANAGE_PENDING_TRANSACTION_STATUS", + "NON_REFERENCED_CREDIT", + "MASS_PAY", + "ENCRYPTED_WEBSITE_PAYMENTS", + "SETTLEMENT_CONSOLIDATION", + "SETTLEMENT_REPORTING", + "MOBILE_CHECKOUT", + "AIR_TRAVEL", + "INVOICING", + "RECURRING_PAYMENT_REPORT", + "EXTENDED_PRO_PROCESSING_REPORT", + "EXCEPTION_PROCESSING_REPORT", + "TRANSACTION_DETAIL_REPORT", + "ACCOUNT_MANAGEMENT_PERMISSION", + "ACCESS_BASIC_PERSONAL_DATA", + "ACCESS_ADVANCED_PERSONAL_DATA" + ] + } + } + } + }, + "product-preferences": { + "type": "object", + "title": "Product Preferences", + "description": "The product preferences. A partner can customize these preferences based on the country and product.", + "properties": { + "product": { + "type": "string", + "description": "The product to which these preferences belong.", + "enum": [ + "EXPRESS_CHECKOUT", + "WEBSITE_PAYMENTS_STANDARD", + "MASS_PAYMENT", + "EMAIL_PAYMENTS", + "EBAY_CHECKOUT", + "PAYFLOW_LINK", + "PAYFLOW_PRO", + "WEBSITE_PAYMENTS_PRO_3_0", + "WEBSITE_PAYMENTS_PRO_2_0", + "VIRTUAL_TERMINAL", + "HOSTED_SOLE_SOLUTION", + "BILL_ME_LATER", + "MOBILE_EXPRESS_CHECKOUT", + "PAYPAL_HERE", + "MOBILE_IN_STORE", + "PAYPAL_STANDARD", + "MOBILE_PAYPAL_STANDARD", + "MOBILE_PAYMENT_ACCEPTANCE", + "PAYPAL_ADVANCED", + "PAYPAL_PRO", + "ENHANCED_RECURRING_PAYMENTS" + ] + }, + "url": { + "type": "string", + "description": "The URL to which to redirect the seller after sign-up is complete.", + "format": "uri", + "maxLength": 2048 + } + } + }, + "message": { + "type": "object", + "title": "Message", + "description": "The user- and seller-provided messages.", + "properties": { + "message": { + "type": "string", + "description": "The message text.", + "maxLength": 255 + }, + "language_code": { + "type": "string", + "description": "The [locale code](/docs/api/reference/locale-codes/) for the language of the message, such as `en_US`." + } + } + }, + "region-preferences": { + "type": "object", + "title": "Region Preferences", + "description": "The region preferences.", + "properties": { + "country_code": { + "type": "string", + "description": "The [two-character ISO-3166-1 country code](/docs/api/reference/country-codes/) for the country that is associated with the preferences." + }, + "product_preferences": { + "type": "array", + "description": "An array of product preferences. Can change for a country or product.", + "items": { + "$ref": "#/components/schemas/product-preferences" + } + }, + "return_message": { + "type": "array", + "description": "An array of messages to the seller from the partner after completion of sign-up. The message can change by country and language.", + "items": { + "$ref": "#/components/schemas/message" + } + } + } + }, + "partner": { + "type": "object", + "title": "Partner", + "description": "The seller acquisition partner-related information. Defines the settings for the customized onboarding experience of the seller.", + "properties": { + "partner_id": { + "type": "string", + "description": "The account ID of the partner." + }, + "launch_type": { + "type": "string", + "description": "Indicates whether the onboarding occurs in a full browser, mini-browser, or light box.", + "default": "FULL_BROWSER", + "enum": [ + "FULL_BROWSER", + "LIGHT_BOX", + "EMBEDDED", + "MINI_BROWSER" + ] + }, + "receives_credential": { + "type": "boolean", + "description": "Indicates whether the partner is integrated to receive a seller credential.", + "default": false + }, + "product_selection": { + "type": "string", + "description": "Indicates whether the seller can select a product with which to integrate.", + "enum": [ + "Y", + "N", + "P" + ] + }, + "logo_url": { + "type": "string", + "description": "The partner logo URL. Provides a way for partners to update their logo through preferences. This logo over-writes any image URL provided earlier for their business accounts.", + "format": "uri" + }, + "notification_url": { + "type": "string", + "description": "The partner-provided URL for notifications.", + "format": "uri" + }, + "integration_preferences": { + "type": "array", + "description": "An array of required information for a partner to integrate this product. Varies based on the product to integrate.", + "items": { + "$ref": "#/components/schemas/product-integration" + } + }, + "region_preferences": { + "type": "array", + "description": "An array of region-specific preferences.", + "items": { + "$ref": "#/components/schemas/region-preferences" + } + }, + "agreement_types": { + "type": "array", + "description": "An array of partner-accepted agreements.", + "items": { + "description": "A partner-accepted agreement.", + "enum": [ + "VENDOR_SECURITY_POLICY_AGREEMENT" + ] + } + }, + "display_name": { + "type": "string", + "description": "The display name of the partner.", + "readOnly": true + } + } } }, "examples": { @@ -2584,4 +3356,4 @@ } } } -} +} \ No newline at end of file diff --git a/openapi/customer_partner_referrals_v2.json b/openapi/customer_partner_referrals_v2.json index 2fd188f..6749e52 100644 --- a/openapi/customer_partner_referrals_v2.json +++ b/openapi/customer_partner_referrals_v2.json @@ -280,7 +280,7 @@ "schemas": { "400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -359,7 +359,7 @@ }, "401": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -387,7 +387,7 @@ }, "403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -415,7 +415,7 @@ }, "422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -535,10 +535,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -552,7 +594,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -562,17 +604,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -586,7 +632,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -596,17 +642,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -620,7 +670,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -630,17 +680,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -654,7 +708,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -664,17 +718,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -688,7 +746,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -698,17 +756,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -722,7 +784,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -732,17 +794,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -756,7 +822,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -766,17 +832,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -794,26 +864,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -831,10 +907,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -2155,6 +2235,7 @@ "ROUTING_NUMBER_2", "ROUTING_NUMBER_3", "SWIFT_CODE", + "BRANCH_CODE", "INTERMEDIARY_SWIFT_CODE", "BBAN", "BBAN_ENCRYPTED", diff --git a/openapi/invoicing_v1.json b/openapi/invoicing_v1.json index eb75cfe..201d46c 100644 --- a/openapi/invoicing_v1.json +++ b/openapi/invoicing_v1.json @@ -3,8 +3,9 @@ "info": { "title": "Invoicing", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Use the Invoicing API to create, send, and manage invoices. You can also use the API or webhooks to track invoice payments. When you send an invoice to a customer, the invoice moves from draft to payable state. PayPal then emails the customer a link to the invoice on the PayPal website. Customers with a PayPal account can log in and pay the invoice with PayPal. Alternatively, customers can pay as a guest with a debit card or credit card. For more information, see Invoicing Overview and the Invoicing Integration Guide.", - "version": "1.11" + "version": "1.13" }, + "deprecated": true, "paths": { "/v1/invoicing/invoices": { "post": { @@ -23,7 +24,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "requestBody": { @@ -56,7 +64,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -99,7 +114,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "requestBody": { @@ -133,7 +155,14 @@ "description": "A successful request returns the HTTP `202 Accepted` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -166,7 +195,14 @@ "description": "A successful request returns the HTTP `202 Accepted` status code and a JSON response body with a link to the invoice ." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -196,7 +232,14 @@ "description": "A successful request returns the HTTP `202 Accepted` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -235,7 +278,14 @@ "description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -274,7 +324,14 @@ "description": "A successful request returns the HTTP `200 OK` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -313,7 +370,14 @@ "description": "A successful request returns the HTTP `200 OK` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -359,7 +423,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -394,7 +465,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -428,7 +506,14 @@ "description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -458,7 +543,14 @@ "description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -491,7 +583,14 @@ "description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -531,7 +630,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -574,7 +680,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "security": [ @@ -606,7 +719,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "requestBody": { @@ -639,7 +759,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -676,7 +803,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -704,7 +838,14 @@ "description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -739,7 +880,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -929,18 +1077,6 @@ } } }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -1005,10 +1141,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -1022,7 +1200,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1032,17 +1210,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -1056,7 +1238,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1066,17 +1248,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -1090,7 +1276,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1100,17 +1286,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -1124,7 +1314,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1134,17 +1324,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -1158,7 +1352,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1168,17 +1362,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -1192,7 +1390,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1202,17 +1400,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -1226,7 +1428,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1236,17 +1438,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -1264,26 +1470,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -1301,10 +1513,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -1314,6 +1530,65 @@ "information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE" } }, + "error_details-2": { + "type": "object", + "title": "Error Details", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The name of the field that caused the error." + }, + "issue": { + "type": "string", + "description": "The reason for the error." + } + }, + "required": [ + "field", + "issue" + ] + }, + "error": { + "type": "object", + "title": "Error", + "description": "The error information.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error.", + "readOnly": true + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "The message that describes the error.", + "readOnly": true + }, + "information_link": { + "type": "string", + "description": "The URI to detailed information related to this error for the developer.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "An array of additional details for the error.", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/error_details-2" + } + } + }, + "required": [ + "name", + "message", + "information_link" + ] + }, "address": { "type": "object", "title": "Address", diff --git a/openapi/invoicing_v2.json b/openapi/invoicing_v2.json index 81b9d24..8169263 100644 --- a/openapi/invoicing_v2.json +++ b/openapi/invoicing_v2.json @@ -2286,7 +2286,7 @@ "schemas": { "400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2331,7 +2331,7 @@ }, "403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2359,7 +2359,7 @@ }, "422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2448,10 +2448,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -2465,7 +2507,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2475,17 +2517,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -2499,7 +2545,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2509,17 +2555,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -2533,7 +2583,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2543,17 +2593,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -2567,7 +2621,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2577,17 +2631,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -2601,7 +2659,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2611,17 +2669,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -2635,7 +2697,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2645,17 +2707,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -2669,7 +2735,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -2679,17 +2745,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -2707,26 +2777,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -2744,10 +2820,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -3981,7 +4061,7 @@ }, "invoices.create-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -4723,7 +4803,7 @@ }, "invoices.remind-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -4768,7 +4848,7 @@ }, "invoices.remind-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -4796,7 +4876,7 @@ }, "invoices.cancel-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -4841,7 +4921,7 @@ }, "invoices.cancel-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -4949,7 +5029,7 @@ }, "invoices.payments-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -5147,7 +5227,7 @@ }, "invoices.payments-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -5209,7 +5289,7 @@ }, "invoices.payments-delete-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -5249,7 +5329,7 @@ }, "invoices.refunds-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -5447,7 +5527,7 @@ }, "invoices.refunds-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -5520,7 +5600,7 @@ }, "invoices.generate-qr-code-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -5595,7 +5675,7 @@ }, "invoices.update-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6428,7 +6508,7 @@ }, "invoices.search-invoices-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6810,7 +6890,7 @@ }, "templates.create-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6923,7 +7003,7 @@ }, "templates.create-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6951,7 +7031,7 @@ }, "templates.get-403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -6979,7 +7059,7 @@ }, "templates.update-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -7092,7 +7172,7 @@ }, "templates.update-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -7120,7 +7200,7 @@ }, "templates.delete-403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ diff --git a/openapi/notifications_webhooks_v1.json b/openapi/notifications_webhooks_v1.json index 6408a91..dd88fd6 100644 --- a/openapi/notifications_webhooks_v1.json +++ b/openapi/notifications_webhooks_v1.json @@ -23,7 +23,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "requestBody": { @@ -67,7 +74,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -104,7 +118,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -139,7 +160,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -148,7 +176,13 @@ } ], "requestBody": { - "$ref": "#/components/requestBodies/patch_request" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/patch_request" + } + } + } }, "security": [ { @@ -170,7 +204,14 @@ "description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -207,7 +248,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -244,7 +292,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "security": [ @@ -274,7 +329,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "security": [ @@ -306,7 +368,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -334,7 +403,14 @@ "description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -371,7 +447,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "requestBody": { @@ -391,7 +474,8 @@ "security": [ { "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" + "https://uri.paypal.com/services/applications/webhooks", + "https://uri.paypal.com/services/applications/verify-webhook-signature" ] } ], @@ -417,16 +501,16 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks-event-types" ] @@ -449,7 +533,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -498,7 +589,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -535,7 +633,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -586,7 +691,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "requestBody": { @@ -680,22 +792,6 @@ } ], "components": { - "requestBodies": { - "patch_request": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/patch_request" - }, - "examples": { - "patch_request": { - "$ref": "#/components/examples/patch_request" - } - } - } - } - } - }, "securitySchemes": { "Oauth2": { "type": "oauth2", @@ -704,7 +800,8 @@ "clientCredentials": { "tokenUrl": "/v1/oauth2/token", "scopes": { - "https://uri.paypal.com/services/applications/webhooks": "Access/update Webhooks." + "https://uri.paypal.com/services/applications/webhooks": "Access/update Webhooks.", + "https://uri.paypal.com/services/applications/verify-webhook-signature": "Verify Webhook Signature" } } } @@ -842,10 +939,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -859,7 +998,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -869,17 +1008,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -893,7 +1036,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -903,17 +1046,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -927,7 +1074,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -937,17 +1084,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -961,7 +1112,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -971,17 +1122,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -995,7 +1150,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1005,17 +1160,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -1029,7 +1188,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1039,17 +1198,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -1063,7 +1226,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1073,17 +1236,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -1101,26 +1268,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -1138,10 +1311,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -1151,6 +1328,84 @@ "information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE" } }, + "link_description": { + "type": "object", + "title": "Link Description", + "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "type": "string", + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." + }, + "rel": { + "type": "string", + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." + }, + "method": { + "type": "string", + "description": "The HTTP method required to make the related call.", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "CONNECT", + "OPTIONS", + "PATCH" + ] + } + } + }, + "error": { + "type": "object", + "title": "Error", + "description": "The error details.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "information_link": { + "type": "string", + "description": "The information link, or URI, that shows detailed information about this error for the developer.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "An array of additional details about the error.", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "links": { + "type": "array", + "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/link_description", + "readOnly": true + } + } + }, + "required": [ + "name", + "message", + "debug_id" + ] + }, "event_type": { "type": "object", "title": "Event Type", @@ -1185,39 +1440,6 @@ "name" ] }, - "link_description": { - "type": "object", - "title": "Link Description", - "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", - "required": [ - "href", - "rel" - ], - "properties": { - "href": { - "type": "string", - "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." - }, - "rel": { - "type": "string", - "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." - }, - "method": { - "type": "string", - "description": "The HTTP method required to make the related call.", - "enum": [ - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "CONNECT", - "OPTIONS", - "PATCH" - ] - } - } - }, "webhook": { "type": "object", "title": "Webhook", @@ -1527,7 +1749,7 @@ "anchor_type": { "name": "anchor_type", "in": "query", - "description": "Filters the webhooks in the response by an anchor type.", + "description": "Filters the webhooks in the response by an `anchor_id` entity type.", "schema": { "type": "string", "enum": [ @@ -1558,7 +1780,7 @@ "page_size": { "name": "page_size", "in": "query", - "description": "Limits the number of items in the response to the specified page size.", + "description": "The number of webhook event notifications to return in the response.", "schema": { "type": "integer", "default": 10 @@ -1567,7 +1789,7 @@ "start_time": { "name": "start_time", "in": "query", - "description": "Filters the errors in the response to those created on or after this date and time and on or before the `end_time` value. Both values are in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) format. Example: `start_time=2013-04-06T11:00:00Z`.", + "description": "Filters the webhook event notifications in the response to those created on or after this date and time and on or before the `end_time` value. Both values are in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) format. Example: `start_time=2013-03-06T11:00:00Z`.", "schema": { "type": "string" } @@ -1575,7 +1797,7 @@ "end_time": { "name": "end_time", "in": "query", - "description": "Filters the errors in the response to those created on or after the `start_time` and on or before this date and time. Both values are in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Example: `end_time=2013-04-06T11:00:00Z`.", + "description": "Filters the webhook event notifications in the response to those created on or after the `start_time` and on or before this date and time. Both values are in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) format. Example: `end_time=2013-03-06T11:00:00Z`.", "schema": { "type": "string" } @@ -1608,18 +1830,6 @@ } } }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } - } - } - }, "examples": { "patch_request": { "value": [ diff --git a/openapi/payment-experience_web_experience_profiles_v1.json b/openapi/payment-experience_web_experience_profiles_v1.json index 894e8c9..902325a 100644 --- a/openapi/payment-experience_web_experience_profiles_v1.json +++ b/openapi/payment-experience_web_experience_profiles_v1.json @@ -43,7 +43,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -99,7 +106,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "security": [ @@ -144,7 +158,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -193,7 +214,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -260,7 +288,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -306,7 +341,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -402,8 +444,7 @@ "description": "Required for operations with a request body. The value is application/. Where the 'format' is 'json'.", "required": true, "schema": { - "type": "string", - "default": "application/json" + "type": "string" } }, "id": { @@ -416,18 +457,6 @@ } } }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -492,10 +521,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -509,7 +580,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -519,17 +590,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -543,7 +618,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -553,17 +628,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -577,7 +656,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -587,17 +666,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -611,7 +694,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -621,17 +704,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -645,7 +732,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -655,17 +742,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -679,7 +770,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -689,17 +780,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -713,7 +808,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -723,17 +818,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -751,26 +850,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -788,10 +893,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -801,6 +910,65 @@ "information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE" } }, + "error_details-2": { + "type": "object", + "title": "Error Details", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The name of the field that caused the error." + }, + "issue": { + "type": "string", + "description": "The reason for the error." + } + }, + "required": [ + "field", + "issue" + ] + }, + "error": { + "type": "object", + "title": "Error", + "description": "The error information.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error.", + "readOnly": true + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "The message that describes the error.", + "readOnly": true + }, + "information_link": { + "type": "string", + "description": "The URI to detailed information related to this error for the developer.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "An array of additional details for the error.", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/error_details-2" + } + } + }, + "required": [ + "name", + "message", + "information_link" + ] + }, "web_profile": { "type": "object", "description": "A payment web experience profile.", @@ -925,65 +1093,6 @@ "$ref": "#/components/schemas/web_profile" } }, - "error_details-2": { - "type": "object", - "title": "Error Details", - "description": "The error details. Required for client-side `4XX` errors.", - "properties": { - "field": { - "type": "string", - "description": "The name of the field that caused the error." - }, - "issue": { - "type": "string", - "description": "The reason for the error." - } - }, - "required": [ - "field", - "issue" - ] - }, - "error": { - "type": "object", - "title": "Error", - "description": "The error information.", - "properties": { - "name": { - "type": "string", - "description": "The human-readable, unique name of the error.", - "readOnly": true - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes.", - "readOnly": true - }, - "message": { - "type": "string", - "description": "The message that describes the error.", - "readOnly": true - }, - "information_link": { - "type": "string", - "description": "The URI to detailed information related to this error for the developer.", - "readOnly": true - }, - "details": { - "type": "array", - "description": "An array of additional details for the error.", - "readOnly": true, - "items": { - "$ref": "#/components/schemas/error_details-2" - } - } - }, - "required": [ - "name", - "message", - "information_link" - ] - }, "patch": { "type": "object", "title": "Patch", diff --git a/openapi/payments_payment_v1.json b/openapi/payments_payment_v1.json index a67625f..7592d8a 100644 --- a/openapi/payments_payment_v1.json +++ b/openapi/payments_payment_v1.json @@ -5,6 +5,7 @@ "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Use the Payments REST API to easily and securely accept online and mobile payments. The payments name space contains resource collections for payments, sales, refunds, authorizations, captures, and orders.
Important: The use of the PayPal REST /payments APIs to accept credit card payments is restricted. Instead, you can accept credit card payments with Braintree Direct.
You can enable customers to make PayPal and credit card payments with only a few clicks, depending on the country. You can accept an immediate payment or authorize a payment and capture it later. You can show details for completed payments, refunds, and authorizations. You can make full or partial refunds. You also can void or re-authorize authorizations. For more information, see the Payments overview.", "version": "1.12" }, + "deprecated": true, "paths": { "/v1/payments/payment": { "post": { @@ -23,7 +24,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -92,7 +100,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -170,7 +185,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -220,7 +242,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -286,7 +315,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -353,7 +389,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -425,7 +468,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -488,7 +538,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -540,7 +597,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -600,7 +664,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -650,7 +721,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -711,7 +789,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -763,7 +848,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -813,7 +905,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -863,7 +962,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -919,7 +1025,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -991,7 +1104,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -1049,7 +1169,14 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -1085,10 +1212,6 @@ "name": "payment", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Use the /payment resource to create a sale, an authorized payment, or an order. A sale is a direct credit card payment, stored credit card payment, or PayPal payment. An authorized payment places funds on hold to be captured later. An order is a purchase that a customer has approved but for which the funds are not placed on hold. You can also use this resource to execute approved PayPal payments and show details for, update, and list payments. For more information, see also ." }, - { - "name": "payment-instruction", - "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Use the /payment-instruction resource to show details for a payment instruction." - }, { "name": "sale", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
A sale is a completed payment. Use the /sale resource to show sale details and refund a sale. For more information, see also Refund payments." @@ -1274,7 +1397,7 @@ "payment_id": { "name": "payment_id", "in": "path", - "description": "The ID of the payment for which to show details.", + "description": "The ID of the payment to execute.", "required": true, "schema": { "type": "string" @@ -1336,18 +1459,6 @@ } } }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -1412,10 +1523,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -1429,7 +1582,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1439,17 +1592,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -1463,7 +1620,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1473,17 +1630,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -1497,7 +1658,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1507,17 +1668,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -1531,7 +1696,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1541,17 +1706,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -1565,7 +1734,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1575,17 +1744,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -1599,7 +1772,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1609,17 +1782,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -1633,7 +1810,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1643,17 +1820,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -1671,26 +1852,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -1708,10 +1895,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -1721,6 +1912,84 @@ "information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE" } }, + "link_description": { + "type": "object", + "title": "Link Description", + "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "type": "string", + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." + }, + "rel": { + "type": "string", + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." + }, + "method": { + "type": "string", + "description": "The HTTP method required to make the related call.", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "CONNECT", + "OPTIONS", + "PATCH" + ] + } + } + }, + "error": { + "type": "object", + "title": "Error", + "description": "The error details.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "information_link": { + "type": "string", + "description": "The information link, or URI, that shows detailed information about this error for the developer.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "An array of additional details about the error.", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "links": { + "type": "array", + "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/link_description", + "readOnly": true + } + } + }, + "required": [ + "name", + "message", + "debug_id" + ] + }, "credit_card_token": { "type": "object", "title": "Credit Card Token", @@ -2349,39 +2618,6 @@ "response_code" ] }, - "link_description": { - "type": "object", - "title": "Link Description", - "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", - "required": [ - "href", - "rel" - ], - "properties": { - "href": { - "type": "string", - "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." - }, - "rel": { - "type": "string", - "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." - }, - "method": { - "type": "string", - "description": "The HTTP method required to make the related call.", - "enum": [ - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "CONNECT", - "OPTIONS", - "PATCH" - ] - } - } - }, "sale": { "type": "object", "title": "Sale", @@ -3522,51 +3758,6 @@ } } ] - }, - "error": { - "type": "object", - "title": "Error", - "description": "The error details.", - "properties": { - "name": { - "type": "string", - "description": "The human-readable, unique name of the error." - }, - "message": { - "type": "string", - "description": "The message that describes the error." - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true - }, - "details": { - "type": "array", - "description": "An array of additional details about the error.", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "links": { - "type": "array", - "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", - "readOnly": true, - "items": { - "$ref": "#/components/schemas/link_description", - "readOnly": true - } - } - }, - "required": [ - "name", - "message", - "debug_id" - ] } }, "examples": { @@ -3706,4 +3897,4 @@ } } } -} +} \ No newline at end of file diff --git a/openapi/payments_payment_v2.json b/openapi/payments_payment_v2.json index c76eca5..c74c9c7 100644 --- a/openapi/payments_payment_v2.json +++ b/openapi/payments_payment_v2.json @@ -237,7 +237,7 @@ "/v2/payments/authorizations/{authorization_id}/reauthorize": { "post": { "summary": "Reauthorize authorized payment", - "description": "Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires.

If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.

A reauthorized payment itself has a new honor period of three days.

You can reauthorize an authorized payment once for up to 115% of the original authorized amount, not to exceed an increase of $75 USD.

Supports only the `amount` request parameter.
Note: This request is currently not supported for Partner use cases.
", + "description": "Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires.

If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.

A reauthorized payment itself has a new honor period of three days.

You can reauthorize an authorized payment from 4 to 29 days after the 3-day honor period. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD.

Supports only the `amount` request parameter.
Note: This request is currently not supported for Partner use cases.
", "operationId": "authorizations.reauthorize", "parameters": [ { @@ -935,11 +935,29 @@ } }, "parameters": { + "authorization_id": { + "name": "authorization_id", + "in": "path", + "description": "The PayPal-generated ID for the authorized payment to void.", + "required": true, + "schema": { + "type": "string" + } + }, + "content_type": { + "name": "Content-Type", + "in": "header", + "description": "Required for operations with a request body. The value is application/. Where the 'format' is 'json'.", + "required": true, + "schema": { + "type": "string" + } + }, "paypal_request_id": { "name": "PayPal-Request-Id", "in": "header", "description": "The server stores keys for 45 days.", - "required": true, + "required": false, "schema": { "type": "string" } @@ -951,34 +969,9 @@ "required": false, "schema": { "type": "string", - "minLength": 1, - "maxLength": 20, - "pattern": "^[a-z=]*$", "default": "return=minimal" } }, - "content_type": { - "name": "Content-Type", - "in": "header", - "description": "The media type. Required for operations with a request body. The value is `application/`, where `format` is `json`.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[A-Za-z0-9/+-]+$", - "default": "application/json" - } - }, - "authorization_id": { - "name": "authorization_id", - "in": "path", - "description": "The PayPal-generated ID for the authorized payment to void.", - "required": true, - "schema": { - "type": "string" - } - }, "paypal_auth_assertion": { "name": "PayPal-Auth-Assertion", "in": "header", @@ -1022,7 +1015,7 @@ "schemas": { "400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1118,7 +1111,7 @@ }, "401": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1146,7 +1139,7 @@ }, "403": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1174,7 +1167,7 @@ }, "404": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1202,7 +1195,7 @@ }, "409": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1230,7 +1223,7 @@ }, "422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -1608,10 +1601,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -1625,7 +1660,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1635,17 +1670,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -1659,7 +1698,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1669,17 +1708,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -1693,7 +1736,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1703,17 +1746,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -1727,7 +1774,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1737,17 +1784,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -1761,7 +1812,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1771,17 +1822,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -1795,7 +1850,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1805,17 +1860,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -1829,7 +1888,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -1839,17 +1898,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -1867,26 +1930,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -1904,10 +1973,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -2396,7 +2469,7 @@ "final_capture": { "description": "Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.", "type": "boolean", - "default": "false" + "default": false }, "payment_instruction": { "$ref": "#/components/schemas/payment_instruction" @@ -2857,7 +2930,7 @@ "reauthorize_request": { "title": "Reauthorize Request", "type": "object", - "description": "Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. You can reauthorize a payment only once from days four to 29.

If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.

A reauthorized payment itself has a new honor period of three days.

You can reauthorize an authorized payment once for up to 115% of the original authorized amount, not to exceed an increase of $75 USD.

Supports only the `amount` request parameter.
Note: This request is currently not supported for Partner use cases.
", + "description": "Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. You can reauthorize a payment only once from days four to 29.

If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.

A reauthorized payment itself has a new honor period of three days.

You can reauthorize an authorized payment once. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD.

Supports only the `amount` request parameter.
Note: This request is currently not supported for Partner use cases.
", "properties": { "amount": { "description": "The amount to reauthorize for an authorized payment.", @@ -2867,7 +2940,7 @@ }, "authorizations.reauthorize-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -2946,7 +3019,7 @@ }, "authorizations.reauthorize-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -3178,7 +3251,7 @@ }, "authorizations.void-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -3469,7 +3542,7 @@ }, "captures.refund-400": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ @@ -3522,7 +3595,7 @@ }, "captures.refund-422": { "properties": { - "issues": { + "details": { "type": "array", "items": { "anyOf": [ diff --git a/openapi/payments_payouts_batch_v1.json b/openapi/payments_payouts_batch_v1.json index cb1121f..716407b 100644 --- a/openapi/payments_payouts_batch_v1.json +++ b/openapi/payments_payouts_batch_v1.json @@ -2,14 +2,14 @@ "openapi": "3.0.3", "info": { "title": "Payouts", - "description": "Use the Payouts API to make payments to multiple PayPal or Venmo recipients. The Payouts API is a fast, convenient way to send commissions, rebates, rewards, and general disbursements. You can send up to 15,000 payments per call. If you integrated the Payouts API before September 1, 2017, you receive transaction reports through Mass Payments Reporting. Otherwise, view reports from your PayPal Business account. The Payouts API uses the ISO 8601 Internet date and time format.", - "version": "1.8" + "description": "Use the Payouts API to make payments to multiple PayPal or Venmo recipients. The Payouts API is a fast, convenient way to send commissions, rebates, rewards, and general disbursements. You can send up to 15,000 payments per call. If you integrated the Payouts API before September 1, 2017, you receive transaction reports through Mass Payments Reporting. Otherwise, view reports from your PayPal Business account. The Payouts API uses the ISO 8601 Internet date and time format.", + "version": "1.9" }, "paths": { "/v1/payments/payouts": { "post": { "summary": "Create batch payout", - "description": "Creates a batch payout. In the JSON request body, pass a `sender_batch_header` and an `items` array. The `sender_batch_header` defines how to handle the payout. The `items` array defines the payout items.
You can make payouts to one or more recipients.
Notes:
  • PayPal does not process duplicate payouts. If you specify a sender_batch_id that was used in the last 30 days, the API rejects the request with an error message that shows the duplicate sender_batch_id and includes a HATEOAS link to the original payout with the same sender_batch_id.

    If you receive an HTTP 5nn status code, you can safely retry the request with the same sender_batch_id.

  • The Payouts API does not support build notation (BN) codes. In a future Payouts release, you can optionally provide BN codes in the PayPal-Partner-Attribution-Id request header.

    For information about the PayPal-Partner-Attribution-Id header, see HTTP request headers. To learn about or request a BN code, contact your partner manager or see PayPal Partner Program.

", + "description": "Creates a batch payout. In the JSON request body, pass a `sender_batch_header` and an `items` array. The `sender_batch_header` defines how to handle the payout. The `items` array defines the payout items.
You can make payouts to one or more recipients.
Notes:
  • PayPal does not process duplicate payouts. If you specify a sender_batch_id that was used in the last 30 days, the API rejects the request with an error message that shows the duplicate sender_batch_id and includes a HATEOAS link to the original payout with the same sender_batch_id.

    If you receive an HTTP 5nn status code, you can safely retry the request with the same sender_batch_id.

  • The Payouts API does not support build notation (BN) codes. In a future Payouts release, you can optionally provide BN codes in the PayPal-Partner-Attribution-Id request header.

    For information about the PayPal-Partner-Attribution-Id header, see HTTP request headers. To learn about or request a BN code, contact your partner manager or see PayPal Partner Program.

", "operationId": "payouts.post", "responses": { "201": { @@ -22,8 +22,45 @@ } } }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "Authorization failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -57,7 +94,7 @@ ] } }, - "/v1/payments/payouts/{payout_batch_id}": { + "/v1/payments/payouts/{id}": { "get": { "summary": "Show payout batch details", "description": "Shows the latest status of a batch payout. Includes the transaction status and other data for individual payout items.", @@ -73,13 +110,40 @@ } } }, + "404": { + "description": "Resource Not Found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ { - "$ref": "#/components/parameters/payout_batch_id" + "$ref": "#/components/parameters/id" }, { "$ref": "#/components/parameters/fields" @@ -122,8 +186,35 @@ } } }, + "404": { + "description": "Resource Not Found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -159,8 +250,45 @@ } } }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "Resource Not Found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -221,7 +349,8 @@ "clientCredentials": { "tokenUrl": "/v1/oauth2/token", "scopes": { - "https://uri.paypal.com/payments/payouts": "Payout to a list of recipients." + "https://uri.paypal.com/payments/payouts": "Payout to a list of recipients.", + "https://uri.paypal.com/services/payments/payouts-item/reverse": "For reversing a completed payout item." } } } @@ -234,16 +363,22 @@ "description": "The server stores keys for 30 days.", "required": false, "schema": { - "type": "string" + "type": "string", + "minLength": 1, + "maxLength": 1000, + "pattern": "^.*$" } }, - "payout_batch_id": { - "name": "payout_batch_id", + "id": { + "name": "id", "in": "path", - "description": "The ID of the payout to update.", + "description": "The ID of the payout for which to show details.", "required": true, "schema": { - "type": "string" + "type": "string", + "minLength": 1, + "maxLength": 1000, + "pattern": "^.*$" } }, "fields": { @@ -252,7 +387,10 @@ "description": "Shows details for only the specified fields.", "required": false, "schema": { - "type": "string" + "type": "string", + "minLength": 1, + "maxLength": 1000, + "pattern": "^.*$" } }, "page": { @@ -262,6 +400,8 @@ "required": false, "schema": { "type": "integer", + "minimum": 0, + "maximum": 1000, "default": 1 } }, @@ -271,7 +411,9 @@ "description": "The maximum number of results to return at one time. Value is a non-negative, non-zero integer. If the user chooses pagination, the maximum page is `1000`.", "required": false, "schema": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 1000 } }, "total_required": { @@ -289,19 +431,10 @@ "description": "The ID of the payout item to cancel.", "required": true, "schema": { - "type": "string" - } - } - }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } + "type": "string", + "minLength": 1, + "maxLength": 32, + "pattern": "^.*$" } } }, @@ -369,10 +502,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -386,7 +561,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -396,17 +571,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -420,7 +599,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -430,17 +609,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -454,7 +637,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -464,17 +647,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -488,7 +675,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -498,17 +685,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -522,7 +713,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -532,17 +723,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -556,7 +751,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -566,17 +761,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -590,7 +789,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -600,17 +799,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -628,26 +831,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -665,10 +874,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -686,27 +899,37 @@ "sender_batch_id": { "type": "string", "description": "A sender-specified ID number. Tracks the payout in an accounting system.
Note:

PayPal does not process duplicate payouts. If you specify a sender_batch_id that was used in the last 30 days, the API rejects the request with an error message that shows the duplicate sender_batch_id and includes a HATEOAS link to the original payout with the same sender_batch_id.

If you receive an HTTP 5nn status code, you can safely retry the request with the same sender_batch_id. The API completes a payment only once for a sender_batch_id that is used within 30 days.

", - "maxLength": 256 + "minLength": 0, + "maxLength": 256, + "pattern": "^.*$" }, "recipient_type": { "type": "string", "description": "The ID type that identifies the recipient of the payment. For example, EMAIL.", - "maxLength": 13 + "minLength": 0, + "maxLength": 13, + "pattern": "^.*$" }, "email_subject": { "type": "string", "description": "The subject line for the email that PayPal sends when payment for a payout item completes. The subject line is the same for all recipients. Value is an alphanumeric string of up to 255 single-byte characters.", - "maxLength": 255 + "minLength": 0, + "maxLength": 255, + "pattern": "^.*$" }, "email_message": { "type": "string", "description": "The email message that PayPal sends when the payout item completes. The message is the same for all recipients.", - "maxLength": 1000 + "minLength": 0, + "maxLength": 1000, + "pattern": "^.*$" }, "note": { "type": "string", "description": "The payouts and item-level notes are concatenated in the email. The maximum combined length of the notes is 1000 characters.", - "maxLength": 1000 + "minLength": 0, + "maxLength": 1000, + "pattern": "^.*$" } } }, @@ -789,21 +1012,46 @@ "type": "string", "default": "PRIVATE", "description": "This attribute controls the privacy of a payout transaction in recipient’s feed. PUBLIC, FRIENDS_ONLY & PRIVATE are the values that can be used. PUBLIC - The payment displays on the recipient's public Venmo feed. FRIENDS_ONLY - The payment displays only to the recipient's Venmo friends. PRIVATE - The payment displays only on the recipient's personal feed. Defaults to `PRIVATE` if left blank.", - "maxLength": 15 + "minLength": 1, + "maxLength": 15, + "pattern": "^.*$" }, "holler_url": { "type": "string", "description": "Link to a Holler sticker. For Venmo recipients, the sticker displays with the payout message. The maximum URL length is 151.", "format": "uri", + "minLength": 1, + "maxLength": 1000, "deprecated": true }, "logo_url": { "type": "string", "description": "Link to a logo that displays as the sender's profile image in the recipient's Venmo feed. Used to add or update the business profile image. Max image size: 1024 x 1024 pixels. The image should be square and maximum URL length is 2000.", - "format": "uri" + "format": "uri", + "minLength": 0, + "maxLength": 1000 } } }, + "purpose_enum": { + "type": "string", + "title": "Purpose", + "description": "The purpose of the transaction.", + "minLength": 1, + "maxLength": 40, + "pattern": "^[A-Z0-9_]+$", + "enum": [ + "AWARDS", + "PRIZES", + "DONATIONS", + "GOODS", + "SERVICES", + "REBATES", + "CASHBACK", + "DISCOUNTS", + "NON_GOODS_OR_SERVICES" + ] + }, "payout_item": { "type": "object", "title": "Payout Item", @@ -812,7 +1060,9 @@ "recipient_type": { "type": "string", "description": "The recipient type. Value is:
  • EMAIL. The unencrypted email. Value is a string of up to 127 single-byte characters.

  • PHONE. The unencrypted phone number.

    Note: The PayPal sandbox does not support the PHONE recipient type.
  • PAYPAL_ID. The encrypted PayPal account number.

  • USER_HANDLE. User handle (or) Username associated with Venmo account.


If the sender_batch_header includes the recipient_type attribute, payout items use the recipient_type of the sender_batch_header, unless a payout item has its own recipient_type attribute. If the sender_batch_header omits the recipient_type attribute, each payout item must include its own recipient_type value.", - "maxLength": 13 + "minLength": 0, + "maxLength": 13, + "pattern": "^.*$" }, "amount": { "description": "The currency and amount to pay the receiver.", @@ -821,23 +1071,31 @@ "note": { "type": "string", "description": "The sender-specified note for notifications. Supports up to 4000 ASCII characters and 1000 non-ASCII characters.", - "maxLength": 4000 + "minLength": 0, + "maxLength": 4000, + "pattern": "^.*$" }, "receiver": { "type": "string", "description": "The receiver of the payment. Corresponds to the `recipient_type` value in the request. Max value of up to 127 single-byte characters.", - "maxLength": 127 + "minLength": 0, + "maxLength": 127, + "pattern": "^.*$" }, "sender_item_id": { "type": "string", "description": "The sender-specified ID number. Tracks the payout in an accounting system.", - "maxLength": 63 + "minLength": 0, + "maxLength": 63, + "pattern": "^.*$" }, "recipient_wallet": { "type": "string", "description": "The recipient wallet.", "default": "PAYPAL", - "maxLength": 36 + "minLength": 0, + "maxLength": 36, + "pattern": "^.*$" }, "alternate_notification_method": { "description": "Captures additional notification modes to reach out to the receiver regarding this payment.", @@ -850,6 +1108,10 @@ "application_context": { "description": "Metadata for accepting additional information from merchants to Venmo.", "$ref": "#/components/schemas/application_context" + }, + "purpose": { + "description": "The purpose of the transaction.", + "$ref": "#/components/schemas/purpose_enum" } }, "required": [ @@ -869,8 +1131,8 @@ "items": { "type": "array", "description": "An array of individual payout items.", - "maxLength": 15000, - "minLength": 1, + "maxItems": 15000, + "minItems": 1, "items": { "$ref": "#/components/schemas/payout_item" } @@ -881,9 +1143,91 @@ "items" ] }, + "link_description": { + "type": "object", + "title": "Link Description", + "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "type": "string", + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." + }, + "rel": { + "type": "string", + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." + }, + "method": { + "type": "string", + "description": "The HTTP method required to make the related call.", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "CONNECT", + "OPTIONS", + "PATCH" + ] + } + } + }, + "error": { + "type": "object", + "title": "Error", + "description": "The error details.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "information_link": { + "type": "string", + "description": "The information link, or URI, that shows detailed information about this error for the developer.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "An array of additional details about the error.", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "links": { + "type": "array", + "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/link_description", + "readOnly": true + } + } + }, + "required": [ + "name", + "message", + "debug_id" + ] + }, "batch_enum": { + "title": "Batch status", "description": "The payouts status.", "type": "string", + "minLength": 1, + "maxLength": 36, + "pattern": "^[0-9A-Z_]+$", "enum": [ "DENIED", "PENDING", @@ -893,8 +1237,12 @@ ] }, "recipient_enum": { + "title": "Recipient type", "description": "The ID type that identifies the payment receiver.", "type": "string", + "minLength": 1, + "maxLength": 36, + "pattern": "^[0-9A-Z_]+$", "enum": [ "EMAIL", "PHONE", @@ -909,7 +1257,9 @@ "sender_batch_id": { "type": "string", "description": "The sender-specified ID number. Tracks the payout in an accounting system.
Note:

PayPal does not process duplicate payouts. If you specify a sender_batch_id that was used in the last 30 days, the API rejects the request with an error message that shows the duplicate sender_batch_id and includes a HATEOAS link to the original payout with the same sender_batch_id.

If you receive an HTTP 5nn status code, you can safely retry the request with the same sender_batch_id. The API completes a payment only once for a sender_batch_id that is used within 30 days.

", - "maxLength": 256 + "minLength": 0, + "maxLength": 256, + "pattern": "^.*$" }, "recipient_type": { "$ref": "#/components/schemas/recipient_enum" @@ -917,12 +1267,16 @@ "email_subject": { "type": "string", "description": "The subject line for the email that PayPal sends when payment for a payout item completes. The subject line is the same for all recipients. Value is an alphanumeric string with a maximum length of 255 single-byte characters.", - "maxLength": 255 + "minLength": 0, + "maxLength": 255, + "pattern": "^.*$" }, "email_message": { "type": "string", "description": "The email message that PayPal sends when the payout item completes. The message is the same for all recipients.", - "maxLength": 1000 + "minLength": 0, + "maxLength": 1000, + "pattern": "^.*$" } } }, @@ -934,7 +1288,9 @@ "payout_batch_id": { "type": "string", "description": "The PayPal-generated ID for a payout.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "batch_status": { "description": "The PayPal-generated payout status. If the payout passes preliminary checks, the status is `PENDING`.", @@ -943,6 +1299,8 @@ "time_created": { "type": "string", "format": "date-time", + "minLength": 0, + "maxLength": 100, "description": "The date and time when processing for the payout began, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." }, "sender_batch_header": { @@ -956,39 +1314,6 @@ "sender_batch_header" ] }, - "link_description": { - "type": "object", - "title": "Link Description", - "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", - "required": [ - "href", - "rel" - ], - "properties": { - "href": { - "type": "string", - "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." - }, - "rel": { - "type": "string", - "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." - }, - "method": { - "type": "string", - "description": "The HTTP method required to make the related call.", - "enum": [ - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "CONNECT", - "OPTIONS", - "PATCH" - ] - } - } - }, "payout": { "type": "object", "title": "Create Payout Response", @@ -1004,13 +1329,19 @@ "readOnly": true, "items": { "$ref": "#/components/schemas/link_description" - } + }, + "minItems": 1, + "maxItems": 15000 } } }, "funding_source": { + "title": "Funding source", "description": "Identifies a funding source type.", "type": "string", + "minLength": 1, + "maxLength": 36, + "pattern": "^[0-9A-Z_]+$", "enum": [ "BALANCE" ] @@ -1023,7 +1354,9 @@ "payout_batch_id": { "type": "string", "description": "The PayPal-generated ID for a payout.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "batch_status": { "description": "The PayPal-generated payout status. If the payout passes preliminary checks, the status is `PENDING`.", @@ -1032,17 +1365,23 @@ "time_created": { "type": "string", "format": "date-time", + "minLength": 0, + "maxLength": 100, "description": "The date and time when processing for the payout began, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." }, "time_completed": { "type": "string", "format": "date-time", - "description": "The date and time when processing for the payout was completed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when processing for the payout was completed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "minLength": 0, + "maxLength": 100 }, "time_closed": { "type": "string", "format": "date-time", - "description": "The date and time when the payout was closed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). A payout is considered closed when all items in a batch are processed and the available balance from the temporary hold is released." + "description": "The date and time when the payout was closed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). A payout is considered closed when all items in a batch are processed and the available balance from the temporary hold is released.", + "minLength": 0, + "maxLength": 100 }, "sender_batch_header": { "description": "The original payout header, as provided by the payment sender.", @@ -1068,8 +1407,12 @@ ] }, "transaction_enum": { + "title": "Transaction status", "description": "The item transaction status.
Note: For POST/v1/payments/payouts-item/{payout_item_id}/cancel, the only possible transaction_status value is RETURNED.
", "type": "string", + "minLength": 1, + "maxLength": 36, + "pattern": "^[0-9A-Z_]+$", "enum": [ "SUCCESS", "FAILED", @@ -1125,9 +1468,13 @@ } }, "recipient_wallet_enum": { + "title": "Recipient wallet", "description": "The wallet where the recipient receives the payout. Payouts to Venmo recipients require a 'note' string and a US mobile phone number.", "type": "string", "default": "PAYPAL", + "minLength": 1, + "maxLength": 36, + "pattern": "^[0-9A-Z_]+$", "enum": [ "PAYPAL", "VENMO", @@ -1149,17 +1496,23 @@ "note": { "type": "string", "description": "The sender-specified note for notifications. Supports up to 4000 ASCII characters and 1000 non-ASCII characters.", - "maxLength": 4000 + "minLength": 0, + "maxLength": 4000, + "pattern": "^.*$" }, "receiver": { "type": "string", "description": "The receiver of the payment. Corresponds to the `recipient_type` value in the request.", - "maxLength": 127 + "minLength": 0, + "maxLength": 127, + "pattern": "^.*$" }, "sender_item_id": { "type": "string", "description": "A sender-specified ID number. Tracks the payout in an accounting system.", - "maxLength": 63 + "minLength": 0, + "maxLength": 63, + "pattern": "^.*$" }, "recipient_name": { "description": "The name of the recipient where money is credited. For `UNCLAIMED` payments, the recipient name is populated after the payment is claimed.", @@ -1168,6 +1521,10 @@ "recipient_wallet": { "description": "The recipient wallet.", "$ref": "#/components/schemas/recipient_wallet_enum" + }, + "purpose": { + "description": "The purpose of the transaction.", + "$ref": "#/components/schemas/purpose_enum" } }, "required": [ @@ -1190,55 +1547,13 @@ }, "exchange_rate": { "type": "string", - "description": "The exchange rate that is applied for this payout." + "description": "The exchange rate that is applied for this payout.", + "pattern": "^.*$", + "minLength": 0, + "maxLength": 30 } } }, - "error": { - "type": "object", - "title": "Error", - "description": "The error details.", - "properties": { - "name": { - "type": "string", - "description": "The human-readable, unique name of the error." - }, - "message": { - "type": "string", - "description": "The message that describes the error." - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true - }, - "details": { - "type": "array", - "description": "An array of additional details about the error.", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "links": { - "type": "array", - "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", - "readOnly": true, - "items": { - "$ref": "#/components/schemas/link_description", - "readOnly": true - } - } - }, - "required": [ - "name", - "message", - "debug_id" - ] - }, "payout_batch_items": { "type": "object", "title": "Payout Item", @@ -1247,17 +1562,23 @@ "payout_item_id": { "type": "string", "description": "The ID for the payout item. Viewable when you show details for a payout.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "transaction_id": { "type": "string", "description": "The PayPal-generated ID for the transaction.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "activity_id": { "type": "string", "description": "The unique PayPal-generated common ID created to link sender side and receiver side transaction. Used for tracking.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "transaction_status": { "$ref": "#/components/schemas/transaction_enum" @@ -1269,7 +1590,9 @@ "payout_batch_id": { "type": "string", "description": "The PayPal-generated ID for the payout.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "payout_item": { "description": "The sender-provided information for the payout item.", @@ -1282,6 +1605,8 @@ "time_processed": { "type": "string", "format": "date-time", + "minLength": 0, + "maxLength": 100, "description": "The date and time when this item was last processed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." }, "errors": { @@ -1293,7 +1618,9 @@ "readOnly": true, "items": { "$ref": "#/components/schemas/link_description" - } + }, + "minItems": 0, + "maxItems": 15000 } }, "required": [ @@ -1328,7 +1655,9 @@ "description": "An array of individual items.", "items": { "$ref": "#/components/schemas/payout_batch_items" - } + }, + "minItems": 0, + "maxItems": 15000 }, "links": { "type": "array", @@ -1336,7 +1665,9 @@ "readOnly": true, "items": { "$ref": "#/components/schemas/link_description" - } + }, + "minItems": 0, + "maxItems": 15000 } } }, @@ -1348,17 +1679,23 @@ "payout_item_id": { "type": "string", "description": "The ID for the payout item. Visible when you show details for a payout.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "transaction_id": { "type": "string", "description": "The PayPal-generated ID for the transaction.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "activity_id": { "type": "string", "description": "The unique PayPal-generated common ID that links the sender- and receiver-side transactions. Used for tracking.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "transaction_status": { "$ref": "#/components/schemas/transaction_enum" @@ -1370,12 +1707,16 @@ "payout_batch_id": { "type": "string", "description": "The PayPal-generated ID for the payout batch.", - "maxLength": 30 + "minLength": 0, + "maxLength": 30, + "pattern": "^.*$" }, "sender_batch_id": { "type": "string", "description": "A sender-specified ID. Tracks the payout in an accounting system. Should be unique within 30 days.", - "maxLength": 256 + "minLength": 0, + "maxLength": 256, + "pattern": "^.*$" }, "payout_item": { "description": "The sender-provided information for the payout item.", @@ -1388,7 +1729,9 @@ "time_processed": { "type": "string", "format": "date-time", - "description": "The date and time when this item was last processed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when this item was last processed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "minLength": 1, + "maxLength": 100 }, "errors": { "$ref": "#/components/schemas/error", @@ -1400,7 +1743,9 @@ "readOnly": true, "items": { "$ref": "#/components/schemas/link_description" - } + }, + "minItems": 0, + "maxItems": 15000 } }, "required": [ diff --git a/openapi/reporting_transactions_v1.json b/openapi/reporting_transactions_v1.json index 7ca51f3..bb96147 100644 --- a/openapi/reporting_transactions_v1.json +++ b/openapi/reporting_transactions_v1.json @@ -427,10 +427,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -444,7 +486,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -454,17 +496,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -478,7 +524,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -488,17 +534,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -512,7 +562,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -522,17 +572,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -546,7 +600,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -556,17 +610,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -580,7 +638,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -590,17 +648,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -614,7 +676,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -624,17 +686,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -648,7 +714,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -658,17 +724,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -686,26 +756,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -723,10 +799,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { diff --git a/openapi/shipping_shipment_tracking_v1.json b/openapi/shipping_shipment_tracking_v1.json index 1960d56..7269f1d 100644 --- a/openapi/shipping_shipment_tracking_v1.json +++ b/openapi/shipping_shipment_tracking_v1.json @@ -3,7 +3,7 @@ "info": { "title": "Shipment Tracking", "description": "Merchants can use the PayPal Add Tracking API to manage tracking information. Merchants can add tracking numbers and associated information to PayPal. After adding these details to PayPal, merchants can:
  • Update tracking details.
  • Show tracking details.
  • Cancel tracking numbers.
For more information, see the Add Tracking API Overview and Add Tracking API Integration Guide.", - "version": "1.1" + "version": "1.4" }, "paths": { "/v1/shipping/trackers-batch": { @@ -35,94 +35,34 @@ "description": "An internal server error has occurred." }, "default": { - "$ref": "#/components/responses/default" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/tracker_collection" - }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/shipping/trackers/readwrite" - ] - } - ], - "tags": [ - "trackers-batch" - ] - } - }, - "/v1/shipping/trackers": { - "post": { - "summary": "Add tracking information for PayPal transaction", - "description": "Adds tracking information for a PayPal transaction.", - "operationId": "trackers.post", - "responses": { - "200": { - "description": "A successful request returns the HTTP 200 OK status code and a JSON response body that shows tracking information.", + "description": "The error response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/tracker_identifier_collection" + "$ref": "#/components/schemas/error" } } } - }, - "default": { - "$ref": "#/components/responses/default" } }, "requestBody": { - "$ref": "#/components/requestBodies/tracker_collection" - }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/shipping/trackers/readwrite" - ] - } - ], - "tags": [ - "trackers" - ] - }, - "get": { - "summary": "List tracking information", - "description": "Lists tracking information that meet search criteria. The tracking ID is required but the tracking number is optional.", - "operationId": "trackers-batch.get", - "responses": { - "200": { - "description": "A successful request returns the HTTP 200 OK status code and a JSON response body that lists tracking information that meets search criteria.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/tracker" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tracker_collection" } } - }, - "default": { - "$ref": "#/components/responses/default" } }, - "parameters": [ - { - "$ref": "#/components/parameters/transaction_id" - }, - { - "$ref": "#/components/parameters/tracking_number" - } - ], "security": [ { "Oauth2": [ - "https://uri.paypal.com/services/shipping/trackers/read" + "https://uri.paypal.com/services/shipping/trackers/readwrite" ] } ], "tags": [ - "trackers" + "trackers-batch" ] } }, @@ -136,7 +76,14 @@ "description": "A successful request returns the HTTP 204 OK status code with no JSON response body." }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ @@ -185,12 +132,22 @@ } }, "default": { - "$ref": "#/components/responses/default" + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } } }, "parameters": [ { "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/account_id" } ], "security": [ @@ -226,6 +183,10 @@ { "name": "shipments", "description": "Use the `/shipments` resource to fetch all the shipments associated with a given Paypal Account Id." + }, + { + "name": "shipment-tracker", + "description": "Use the `/shipment-tracker` resource to track the shipment." } ], "externalDocs": { @@ -242,22 +203,6 @@ } ], "components": { - "requestBodies": { - "tracker_collection": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/tracker_collection" - }, - "examples": { - "0": { - "$ref": "#/components/examples/tracker_collection" - } - } - } - } - } - }, "securitySchemes": { "Oauth2": { "type": "oauth2", @@ -274,24 +219,6 @@ } }, "parameters": { - "transaction_id": { - "name": "transaction_id", - "in": "query", - "description": "Filters the tracking information that appears in the response by a PayPal transaction ID.", - "required": true, - "schema": { - "type": "string" - } - }, - "tracking_number": { - "name": "tracking_number", - "in": "query", - "description": "Filters the tracking information that appears in the response by a tracking number.", - "required": false, - "schema": { - "type": "string" - } - }, "id": { "name": "id", "in": "path", @@ -303,17 +230,17 @@ "maxLength": 100, "pattern": "^[a-zA-Z0-9-_]*$" } - } - }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } + }, + "account_id": { + "name": "account_id", + "in": "query", + "description": "Encrypted PayPal Account ID of the buyer or seller.", + "required": false, + "schema": { + "type": "string", + "minLength": 13, + "maxLength": 13, + "pattern": "^[2-9A-HJ-NP-Z]{13}$" } } }, @@ -381,10 +308,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -398,7 +367,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -408,17 +377,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -432,7 +405,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -442,17 +415,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -466,7 +443,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -476,17 +453,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -500,7 +481,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -510,17 +491,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -534,7 +519,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -544,17 +529,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -568,7 +557,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -578,17 +567,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -602,7 +595,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -612,17 +605,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -640,26 +637,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -677,10 +680,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { @@ -1696,6 +1703,21 @@ "PARTNER" ] }, + "account_id": { + "type": "string", + "description": "Encrypted PayPal Account ID of the buyer or seller.", + "readOnly": true, + "minLength": 13, + "maxLength": 13, + "pattern": "^[2-9A-HJ-NP-Z]{13}$" + }, + "tracking_url": { + "type": "string", + "format": "uri", + "minLength": 1, + "maxLength": 250, + "description": "Tracking Link of the shipment." + }, "links": { "type": "array", "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", @@ -1736,38 +1758,6 @@ } } }, - "tracker_identifier": { - "type": "object", - "title": "Tracking Identifier", - "description": "The tracking identifiers for a shipment.", - "properties": { - "transaction_id": { - "type": "string", - "description": "The PayPal transaction ID.", - "minLength": 1, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - "tracking_number": { - "type": "string", - "description": "The tracking number for the shipment.", - "minLength": 1, - "maxLength": 64 - }, - "links": { - "type": "array", - "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", - "readOnly": true, - "items": { - "$ref": "#/components/schemas/link_description", - "readOnly": true - } - } - }, - "required": [ - "transaction_id" - ] - }, "link_description-2": { "type": "object", "title": "Link Description", @@ -1846,28 +1836,23 @@ "debug_id" ] }, - "batch_tracker_collection": { + "tracker_identifier": { "type": "object", - "title": "Batch Tracker Collection", - "description": "The add tracking information for multiple PayPal transactions response details.", + "title": "Tracking Identifier", + "description": "The tracking identifiers for a shipment.", "properties": { - "tracker_identifiers": { - "type": "array", - "description": "The batch header.", - "items": { - "$ref": "#/components/schemas/tracker_identifier" - }, - "minItems": 1, - "maxItems": 100 + "transaction_id": { + "type": "string", + "description": "The PayPal transaction ID.", + "minLength": 1, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" }, - "errors": { - "type": "array", - "description": "An array of error responses.", - "items": { - "$ref": "#/components/schemas/error" - }, - "minItems": 1, - "maxItems": 100 + "tracking_number": { + "type": "string", + "description": "The tracking number for the shipment.", + "minLength": 1, + "maxLength": 64 }, "links": { "type": "array", @@ -1878,22 +1863,34 @@ "readOnly": true } } - } + }, + "required": [ + "transaction_id" + ] }, - "tracker_identifier_collection": { + "batch_tracker_collection": { "type": "object", - "title": "Tracker Identifier Collection", - "description": "The add tracking information for a PayPal transaction response details.", + "title": "Batch Tracker Collection", + "description": "The add tracking information for multiple PayPal transactions response details.", "properties": { "tracker_identifiers": { "type": "array", - "description": "An array of tracking IDs.", + "description": "The batch header.", "items": { "$ref": "#/components/schemas/tracker_identifier" }, "minItems": 1, "maxItems": 100 }, + "errors": { + "type": "array", + "description": "An array of error responses.", + "items": { + "$ref": "#/components/schemas/error" + }, + "minItems": 1, + "maxItems": 100 + }, "links": { "type": "array", "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", diff --git a/openapi/vault_payment_tokens_v3.json b/openapi/vault_payment_tokens_v3.json index d0a714f..2811506 100644 --- a/openapi/vault_payment_tokens_v3.json +++ b/openapi/vault_payment_tokens_v3.json @@ -593,8 +593,7 @@ "type": "string", "minLength": 1, "maxLength": 255, - "pattern": "^[A-Za-z0-9/+-]+$", - "default": "application/json" + "pattern": "^[A-Za-z0-9/+-]+$" } }, "paypal_request_id": { @@ -652,7 +651,7 @@ }, "id": { "name": "id", - "description": "A representation of a vault token.", + "description": "ID of the setup token.", "in": "path", "required": true, "schema": { @@ -663,18 +662,6 @@ } } }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" - } - } - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -739,10 +726,52 @@ } ] }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 7, + "pattern": "^[A-Z]*$", + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT" + ] + } + } + }, "error_400": { "type": "object", - "title": "400 Error", - "description": "Error response for 400", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", "properties": { "name": { "type": "string", @@ -756,7 +785,7 @@ "Request is not well-formed, syntactically incorrect, or violates schema." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -766,17 +795,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_401": { "type": "object", - "title": "401 Error", - "description": "Error response for 401", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", "properties": { "name": { "type": "string", @@ -790,7 +823,7 @@ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -800,17 +833,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_403": { "type": "object", - "title": "403 Error", - "description": "Error response for 403", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", "properties": { "name": { "type": "string", @@ -824,7 +861,7 @@ "Authorization failed due to insufficient permissions." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -834,17 +871,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_404": { "type": "object", - "title": "404 Error", - "description": "Error response for 404", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", "properties": { "name": { "type": "string", @@ -858,7 +899,7 @@ "The specified resource does not exist." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -868,17 +909,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_409": { "type": "object", - "title": "409 Error", - "description": "Error response for 409", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", "properties": { "name": { "type": "string", @@ -892,7 +937,7 @@ "The server has detected a conflict while processing this request." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -902,17 +947,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_415": { "type": "object", - "title": "409 Error", - "description": "Error response for 415", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", "properties": { "name": { "type": "string", @@ -926,7 +975,7 @@ "The server does not support the request payload's media type." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -936,17 +985,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_422": { "type": "object", - "title": "422 Error", - "description": "Error response for 422", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", "properties": { "name": { "type": "string", @@ -960,7 +1013,7 @@ "The requested action could not be performed, semantically incorrect, or failed business validation." ] }, - "issues": { + "details": { "type": "array", "items": { "$ref": "#/components/schemas/error_details" @@ -970,17 +1023,21 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } } }, "error_500": { "type": "object", - "title": "500 Error", - "description": "Error response for 500", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", "properties": { "name": { "type": "string", @@ -998,26 +1055,32 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "enum": [ - "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" - ], - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { "name": "INTERNAL_SERVER_ERROR", "message": "An internal server error occurred.", "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR" + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] } }, "error_503": { "type": "object", - "title": "503 Error", - "description": "Error response for 503", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", "properties": { "name": { "type": "string", @@ -1035,10 +1098,14 @@ "type": "string", "description": "The PayPal internal ID. Used for correlation purposes." }, - "information_link": { - "type": "string", - "description": "The information link, or URI, that shows detailed information about this error for the developer.", - "readOnly": true + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } } }, "example": { From 68e5c0b69d47addc8f1dd72668a67b79c7590953 Mon Sep 17 00:00:00 2001 From: sraj Date: Wed, 20 Dec 2023 14:51:31 -0800 Subject: [PATCH 2/3] Bumping package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea0aaa7..5b6b185 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@paypal/paypal-rest-api-specifications", - "version": "1.0.0", + "version": "1.1.0", "description": "This repository contains the specification files for PayPal's REST APIs.", "license": "Apache-2.0", "repository": { From fce6edc451a4f69ce16eafe69dd359c9fac8e723 Mon Sep 17 00:00:00 2001 From: sraj Date: Wed, 20 Dec 2023 15:29:56 -0800 Subject: [PATCH 3/3] Fixed tokenUrl --- openapi/billing_subscriptions_v1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/billing_subscriptions_v1.json b/openapi/billing_subscriptions_v1.json index e2e5e1c..0c5c02b 100644 --- a/openapi/billing_subscriptions_v1.json +++ b/openapi/billing_subscriptions_v1.json @@ -2163,7 +2163,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/v1/oauth2/token", "scopes": { "https://uri.paypal.com/services/subscriptions": "Manage plan & subscription" }