diff --git a/openapi.json b/openapi.json index 1737533..f83117e 100755 --- a/openapi.json +++ b/openapi.json @@ -3475,11 +3475,11 @@ } }, "403": { - "description": "Error response for compat API calls.", + "description": "Operator creation was forbidden.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompatError" + "$ref": "#/components/schemas/Problem" } } } @@ -3629,7 +3629,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompatError" + "$ref": "#/components/schemas/Problem" } } } @@ -3768,6 +3768,22 @@ "schema": { "type": "string" } + }, + { + "name": "resource.parent.id", + "in": "query", + "description": "Filter memberships by the parent of the resource the membership is in.\nWhen filtering by parent both `resource.parent.id` and `resource.parent.type` must be present.", + "schema": { + "type": "string" + } + }, + { + "name": "resource.parent.type", + "in": "query", + "description": "Filter memberships by the parent of the resource the membership is in.\nWhen filtering by parent both `resource.parent.id` and `resource.parent.type` must be present.", + "schema": { + "$ref": "#/components/schemas/ResourceType" + } } ], "responses": { @@ -3902,11 +3918,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } } ], @@ -3937,7 +3953,14 @@ } }, "404": { - "description": "Merchant not found." + "description": "Merchant not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -3971,11 +3994,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } } ], @@ -4046,13 +4069,34 @@ } }, "400": { - "description": "Invalid request." + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } }, "404": { - "description": "Merchant not found." + "description": "Merchant not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } }, "429": { - "description": "Too many invitations sent to that user. The limit is 10 requests per 5 minutes and the Retry-After header is set to the number of minutes until the reset of the limit." + "description": "Too many invitations sent to that user. The limit is 10 requests per 5 minutes and the Retry-After header is set to the number of minutes until the reset of the limit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -4088,11 +4132,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } }, { @@ -4118,7 +4162,14 @@ } }, "404": { - "description": "Merchant or member not found." + "description": "Merchant or member not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -4152,11 +4203,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } }, { @@ -4235,16 +4286,44 @@ } }, "400": { - "description": "Cannot set password or nickname for an invited user." + "description": "Cannot set password or nickname for an invited user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } }, "403": { - "description": "Cannot change password for managed user. Password was already used before." + "description": "Cannot change password for managed user. Password was already used before.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } }, "404": { - "description": "Merchant or member not found." + "description": "Merchant or member not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } }, "409": { - "description": "Cannot update member as some data conflict with existing members." + "description": "Cannot update member as some data conflict with existing members.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -4278,11 +4357,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } }, { @@ -4301,7 +4380,14 @@ "description": "Returns an empty response if the deletion succeeded." }, "404": { - "description": "Merchant or member not found." + "description": "Merchant or member not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -4337,11 +4423,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } } ], @@ -4368,7 +4454,14 @@ } }, "404": { - "description": "Merchant not found." + "description": "Merchant not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -4402,11 +4495,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } } ], @@ -4464,10 +4557,24 @@ } }, "400": { - "description": "Invalid request." + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } }, "404": { - "description": "Merchant not found." + "description": "Merchant not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -4503,11 +4610,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } }, { @@ -4533,7 +4640,14 @@ } }, "404": { - "description": "Merchant or role not found." + "description": "Merchant or role not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -4567,11 +4681,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } }, { @@ -4590,10 +4704,24 @@ "description": "Returns an empty response if the role deletion succeeded." }, "400": { - "description": "Invalid request." + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } }, "404": { - "description": "Merchant not found." + "description": "Merchant not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -4627,11 +4755,11 @@ { "name": "merchant_code", "in": "path", - "description": "Merchant code.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } }, { @@ -4700,10 +4828,24 @@ } }, "400": { - "description": "Invalid request." + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } }, "404": { - "description": "Merchant not found." + "description": "Merchant not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -5088,11 +5230,11 @@ { "name": "merchant_code", "in": "path", - "description": "Unique identifier of the merchant account.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } } ], @@ -5154,11 +5296,11 @@ { "name": "merchant_code", "in": "path", - "description": "Unique identifier of the merchant account.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } } ], @@ -5175,8 +5317,8 @@ "name": { "$ref": "#/components/schemas/ReaderName" }, - "meta": { - "$ref": "#/components/schemas/Meta" + "metadata": { + "$ref": "#/components/schemas/Metadata" } }, "required": [ @@ -5229,6 +5371,36 @@ "description": "Delete the reader." } } + }, + "400": { + "description": "The request is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "There's no pending reader for the submitted pairing code.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "409": { + "description": "The Reader is not in a pending state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -5289,11 +5461,11 @@ { "name": "merchant_code", "in": "path", - "description": "Unique identifier of the merchant account.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } }, { @@ -5318,7 +5490,14 @@ } }, "404": { - "description": "The requested Reader resource does not exists." + "description": "The requested Reader resource does not exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -5356,11 +5535,11 @@ { "name": "merchant_code", "in": "path", - "description": "Unique identifier of the merchant account.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } }, { @@ -5376,6 +5555,16 @@ "responses": { "200": { "description": "Returns an empty response if the deletion succeeded." + }, + "404": { + "description": "The requested Reader resource does not exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -5391,6 +5580,9 @@ "tags": [ "Readers" ], + "x-codegen": { + "method_name": "delete" + }, "x-permissions": [ { "relation": "readers_delete", @@ -5410,11 +5602,11 @@ { "name": "merchant_code", "in": "path", - "description": "Unique identifier of the merchant account.", + "description": "Short unique identifier for the merchant.", "required": true, "schema": { "type": "string", - "example": "MC0X0ABC" + "example": "MK10CL2A" } }, { @@ -5437,8 +5629,8 @@ "name": { "$ref": "#/components/schemas/ReaderName" }, - "meta": { - "$ref": "#/components/schemas/Meta" + "metadata": { + "$ref": "#/components/schemas/Metadata" } } } @@ -5457,7 +5649,24 @@ } }, "403": { - "description": "The reader is not linked to the merchant account." + "description": "The request isn't sufficiently authorized to modify the reader.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "The requested Reader resource does not exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -7871,6 +8080,7 @@ "internal_id": { "description": "Internal unique ID of the transaction on the SumUp platform.", "type": "integer", + "format": "int64", "example": 1763892018 } } @@ -8317,32 +8527,6 @@ "account_type" ] }, - "CompatError": { - "description": "Error object for compat API calls.", - "type": "object", - "properties": { - "error_code": { - "type": "string", - "example": "NOT_FOUND" - }, - "message": { - "type": "string", - "example": "Resource not found." - } - }, - "required": [ - "error_code", - "message" - ] - }, - "Metadata": { - "description": "Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata.", - "type": "object", - "example": {}, - "additionalProperties": { - "maxLength": 256 - } - }, "Attributes": { "description": "Object attributes that are modifiable only by SumUp applications.", "type": "object", @@ -8509,6 +8693,42 @@ "value" ] }, + "Problem": { + "description": "A RFC 9457 problem details object.\n\nAdditional properties specific to the problem type may be present.\n", + "type": "object", + "properties": { + "type": { + "description": "A URI reference that identifies the problem type.", + "type": "string", + "format": "uri" + }, + "title": { + "description": "A short, human-readable summary of the problem type.", + "type": "string" + }, + "status": { + "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", + "type": "integer", + "example": 400, + "exclusiveMaximum": true, + "maximum": 600, + "minimum": 400 + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem.", + "type": "string" + }, + "instance": { + "description": "A URI reference that identifies the specific occurrence of the problem.", + "type": "string", + "format": "uri" + } + }, + "additionalProperties": true, + "required": [ + "type" + ] + }, "MembershipStatus": { "description": "The status of the membership.", "type": "string", @@ -8917,6 +9137,13 @@ ], "title": "Role" }, + "Metadata": { + "description": "Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.", + "type": "object", + "example": {}, + "additionalProperties": true, + "maxProperties": 64 + }, "ListPersonsResponseBody": { "type": "object", "properties": { @@ -9484,8 +9711,8 @@ "device": { "$ref": "#/components/schemas/ReaderDevice" }, - "meta": { - "$ref": "#/components/schemas/Meta" + "metadata": { + "$ref": "#/components/schemas/Metadata" }, "created_at": { "description": "The timestamp of when the reader was created.", @@ -9511,7 +9738,7 @@ "title": "Reader" }, "ReaderID": { - "description": "Unique identifier of the object.\nNote that this identifies the instance of the physical devices pairing with your SumUp account.\nIf you DELETE a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device.", + "description": "Unique identifier of the object.\n\nNote that this identifies the instance of the physical devices pairing with your SumUp account. If you [delete](https://developer.sumup.com/api/readers/delete-reader) a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device.", "type": "string", "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", "maxLength": 30, @@ -9599,6 +9826,16 @@ } } }, + "InstallmentsTooLow": { + "description": "Error returned when installments is not within the allowed range.", + "value": { + "errors": { + "installments": [ + "is invalid" + ] + } + } + }, "ReaderCheckoutPending": { "description": "Error returned when a checkout was requested in the last 60 seconds.", "value": { @@ -9749,6 +9986,7 @@ "affiliate": { "description": "Affiliate metadata for the transaction.\nIt is a field that allow for integrators to track the source of the transaction.\n", "type": "object", + "nullable": true, "properties": { "app_id": { "description": "Application ID of the affiliate.\nIt is a unique identifier for the application and should be set by the integrator in the [Affiliate Keys](https://developer.sumup.com/affiliate-keys) page.\n", @@ -9810,9 +10048,11 @@ "x-validate": null }, "installments": { - "description": "Number of installments for the transaction.\nIt may vary according to the merchant country.\nFor example, in Brazil, the maximum number of installments is 12.\n", + "description": "Number of installments for the transaction.\nIt may vary according to the merchant country.\nFor example, in Brazil, the maximum number of installments is 12.\n\nOmit if the merchant country does support installments.\nOtherwise, the checkout will be rejected.\n", "type": "integer", "example": 1, + "minimum": 1, + "nullable": true, "x-struct": null, "x-validate": null }, @@ -11080,16 +11320,6 @@ } } }, - "CompatErrorResponse": { - "description": "Error response for compat API calls.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CompatError" - } - } - } - }, "ListMemberships": { "description": "Returns a list of Membership objects.", "content": { diff --git a/openapi.yaml b/openapi.yaml index 248d1f5..7bc811c 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2325,11 +2325,11 @@ paths: schema: $ref: '#/components/schemas/Operator' '403': - description: Error response for compat API calls. + description: Operator creation was forbidden. content: application/json: schema: - $ref: '#/components/schemas/CompatError' + $ref: '#/components/schemas/Problem' deprecated: true security: - apiKey: [] @@ -2425,7 +2425,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CompatError' + $ref: '#/components/schemas/Problem' deprecated: true security: - apiKey: [] @@ -2513,6 +2513,20 @@ paths: description: Filter memberships by the name of the resource the membership is in. schema: type: string + - name: resource.parent.id + in: query + description: |- + Filter memberships by the parent of the resource the membership is in. + When filtering by parent both `resource.parent.id` and `resource.parent.type` must be present. + schema: + type: string + - name: resource.parent.type + in: query + description: |- + Filter memberships by the parent of the resource the membership is in. + When filtering by parent both `resource.parent.id` and `resource.parent.type` must be present. + schema: + $ref: '#/components/schemas/ResourceType' responses: '200': description: Returns a list of Membership objects. @@ -2602,11 +2616,11 @@ paths: style: form - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A responses: '200': description: Returns a list of Member objects. @@ -2626,6 +2640,10 @@ paths: - items '404': description: Merchant not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -2645,11 +2663,11 @@ paths: parameters: - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A requestBody: required: true content: @@ -2698,10 +2716,22 @@ paths: $ref: '#/components/schemas/Member' '400': description: Invalid request. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' '404': description: Merchant not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' '429': description: Too many invitations sent to that user. The limit is 10 requests per 5 minutes and the Retry-After header is set to the number of minutes until the reset of the limit. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -2722,11 +2752,11 @@ paths: parameters: - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A - name: member_id in: path description: The ID of the member to retrieve. @@ -2743,6 +2773,10 @@ paths: $ref: '#/components/schemas/Member' '404': description: Merchant or member not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -2762,11 +2796,11 @@ paths: parameters: - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A - name: member_id in: path description: The ID of the member to retrieve. @@ -2818,12 +2852,28 @@ paths: $ref: '#/components/schemas/Member' '400': description: Cannot set password or nickname for an invited user. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' '403': description: Cannot change password for managed user. Password was already used before. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' '404': description: Merchant or member not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' '409': description: Cannot update member as some data conflict with existing members. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -2843,11 +2893,11 @@ paths: parameters: - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A - name: member_id in: path description: The ID of the member to retrieve. @@ -2860,6 +2910,10 @@ paths: description: Returns an empty response if the deletion succeeded. '404': description: Merchant or member not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -2880,11 +2934,11 @@ paths: parameters: - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A responses: '200': description: Returns a list of Role objects. @@ -2901,6 +2955,10 @@ paths: - items '404': description: Merchant not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -2920,11 +2978,11 @@ paths: parameters: - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A requestBody: required: true content: @@ -2964,8 +3022,16 @@ paths: $ref: '#/components/schemas/Role' '400': description: Invalid request. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' '404': description: Merchant not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -2986,11 +3052,11 @@ paths: parameters: - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A - name: role_id in: path description: The ID of the role to retrieve. @@ -3007,6 +3073,10 @@ paths: $ref: '#/components/schemas/Role' '404': description: Merchant or role not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -3026,11 +3096,11 @@ paths: parameters: - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A - name: role_id in: path description: The ID of the role to retrieve. @@ -3043,8 +3113,16 @@ paths: description: Returns an empty response if the role deletion succeeded. '400': description: Invalid request. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' '404': description: Merchant not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -3064,11 +3142,11 @@ paths: parameters: - name: merchant_code in: path - description: Merchant code. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A - name: role_id in: path description: The ID of the role to retrieve. @@ -3116,8 +3194,16 @@ paths: $ref: '#/components/schemas/Role' '400': description: Invalid request. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' '404': description: Merchant not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: [] @@ -3353,11 +3439,11 @@ paths: parameters: - name: merchant_code in: path - description: Unique identifier of the merchant account. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A responses: '200': description: Returns a list Reader objects. @@ -3393,11 +3479,11 @@ paths: parameters: - name: merchant_code in: path - description: Unique identifier of the merchant account. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A requestBody: required: true content: @@ -3409,8 +3495,8 @@ paths: $ref: '#/components/schemas/ReaderPairingCode' name: $ref: '#/components/schemas/ReaderName' - meta: - $ref: '#/components/schemas/Meta' + metadata: + $ref: '#/components/schemas/Metadata' required: - pairing_code - name @@ -3444,6 +3530,24 @@ paths: parameters: id: $response.body#/id description: Delete the reader. + '400': + description: The request is invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' + '404': + description: There's no pending reader for the submitted pairing code. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' + '409': + description: The Reader is not in a pending state. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: @@ -3485,11 +3589,11 @@ paths: example: '2023-05-30T10:38:01+00:00' - name: merchant_code in: path - description: Unique identifier of the merchant account. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A - name: id in: path description: The unique identifier of the reader. @@ -3505,6 +3609,10 @@ paths: $ref: '#/components/schemas/Reader' '404': description: The requested Reader resource does not exists. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: @@ -3526,11 +3634,11 @@ paths: parameters: - name: merchant_code in: path - description: Unique identifier of the merchant account. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A - name: id in: path description: The unique identifier of the reader. @@ -3540,12 +3648,20 @@ paths: responses: '200': description: Returns an empty response if the deletion succeeded. + '404': + description: The requested Reader resource does not exists. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: - readers.write tags: - Readers + x-codegen: + method_name: delete x-permissions: - relation: readers_delete object_type: merchant @@ -3559,11 +3675,11 @@ paths: parameters: - name: merchant_code in: path - description: Unique identifier of the merchant account. + description: Short unique identifier for the merchant. required: true schema: type: string - example: MC0X0ABC + example: MK10CL2A - name: id in: path description: The unique identifier of the reader. @@ -3579,8 +3695,8 @@ paths: properties: name: $ref: '#/components/schemas/ReaderName' - meta: - $ref: '#/components/schemas/Meta' + metadata: + $ref: '#/components/schemas/Metadata' responses: '200': description: Returns the updated Reader object if the update succeeded. @@ -3589,7 +3705,17 @@ paths: schema: $ref: '#/components/schemas/Reader' '403': - description: The reader is not linked to the merchant account. + description: The request isn't sufficiently authorized to modify the reader. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' + '404': + description: The requested Reader resource does not exists. + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' security: - apiKey: [] - oauth2: @@ -5380,6 +5506,7 @@ components: internal_id: description: Internal unique ID of the transaction on the SumUp platform. type: integer + format: int64 example: 1763892018 TransactionMixinHistory: type: object @@ -5706,25 +5833,6 @@ components: - updated_at - permissions - account_type - CompatError: - description: Error object for compat API calls. - type: object - properties: - error_code: - type: string - example: NOT_FOUND - message: - type: string - example: Resource not found. - required: - - error_code - - message - Metadata: - description: 'Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata.' - type: object - example: {} - additionalProperties: - maxLength: 256 Attributes: description: Object attributes that are modifiable only by SumUp applications. type: object @@ -5877,6 +5985,37 @@ components: required: - ref - value + Problem: + description: | + A RFC 9457 problem details object. + + Additional properties specific to the problem type may be present. + type: object + properties: + type: + description: A URI reference that identifies the problem type. + type: string + format: uri + title: + description: 'A short, human-readable summary of the problem type.' + type: string + status: + description: The HTTP status code generated by the origin server for this occurrence of the problem. + type: integer + example: 400 + exclusiveMaximum: true + maximum: 600 + minimum: 400 + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + instance: + description: A URI reference that identifies the specific occurrence of the problem. + type: string + format: uri + additionalProperties: true + required: + - type MembershipStatus: description: The status of the membership. type: string @@ -6203,6 +6342,12 @@ components: - created_at - updated_at title: Role + Metadata: + description: 'Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.' + type: object + example: {} + additionalProperties: true + maxProperties: 64 ListPersonsResponseBody: type: object properties: @@ -6679,8 +6824,8 @@ components: $ref: '#/components/schemas/ReaderStatus' device: $ref: '#/components/schemas/ReaderDevice' - meta: - $ref: '#/components/schemas/Meta' + metadata: + $ref: '#/components/schemas/Metadata' created_at: description: The timestamp of when the reader was created. type: string @@ -6702,8 +6847,8 @@ components: ReaderID: description: |- Unique identifier of the object. - Note that this identifies the instance of the physical devices pairing with your SumUp account. - If you DELETE a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device. + + Note that this identifies the instance of the physical devices pairing with your SumUp account. If you [delete](https://developer.sumup.com/api/readers/delete-reader) a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device. type: string example: rdr_3MSAFM23CK82VSTT4BN6RWSQ65 maxLength: 30 @@ -6778,6 +6923,12 @@ components: - must be between 0.01 and 0.99 total_amount: - must be greater than 0 + InstallmentsTooLow: + description: Error returned when installments is not within the allowed range. + value: + errors: + installments: + - is invalid ReaderCheckoutPending: description: Error returned when a checkout was requested in the last 60 seconds. value: @@ -6893,6 +7044,7 @@ components: Affiliate metadata for the transaction. It is a field that allow for integrators to track the source of the transaction. type: object + nullable: true properties: app_id: description: | @@ -6958,8 +7110,13 @@ components: Number of installments for the transaction. It may vary according to the merchant country. For example, in Brazil, the maximum number of installments is 12. + + Omit if the merchant country does support installments. + Otherwise, the checkout will be rejected. type: integer example: 1 + minimum: 1 + nullable: true x-struct: null x-validate: null return_url: @@ -7920,12 +8077,6 @@ components: value: error_code: CHECKOUT_PROCESSED message: Checkout is already processed - CompatErrorResponse: - description: Error response for compat API calls. - content: - application/json: - schema: - $ref: '#/components/schemas/CompatError' ListMemberships: description: Returns a list of Membership objects. content: