diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index f141616..37079cb 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -240,6 +240,18 @@ paths: "phoneTypeId": 2, "isPreferred": false } + ], + "devices": [ + { + "deviceTypeId": 1, + "deviceIdentifier": "123e4567-e89b-12d3-a456-426614174000", + "isPreferred": true + }, + { + "deviceTypeId": 2, + "deviceIdentifier": "987e6543-e21b-12d3-a456-426614174999", + "isPreferred": false + } ] } } @@ -327,6 +339,20 @@ paths: "phoneTypeId": 2, "isPreferred": false } + ], + "devices": [ + { + "deviceId": 1, + "deviceTypeId": 1, + "deviceIdentifier": "123e4567-e89b-12d3-a456-426614174000", + "isPreferred": true + }, + { + "deviceId": 2, + "deviceTypeId": 2, + "deviceIdentifier": "987e6543-e21b-12d3-a456-426614174999", + "isPreferred": false + } ] } } @@ -3293,6 +3319,89 @@ paths: }, ], } + /customers/devices: + post: + summary: Add a new device to a customer profile. + description: Add a new device to a customer profile. + tags: + - Devices + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Add a new device: + value: + { + "externalDeviceId": "dee7d80e-9288-4508-a3ed-c067e619179f", + "alias": "My iPhone 13", + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + New device added to customer profile: + value: + { + "deviceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366", + "externalDeviceId": "dee7d80e-9288-4508-a3ed-c067e619179f", + "alias": "My iPhone 13", + } + /customers/devices/{deviceId}: + parameters: + - name: deviceId + in: path + required: true + style: simple + description: Id of the device to be deleted. + schema: + type: string + format: uuid + example: 0f0981bf-6d60-4b06-bc55-de1ba325f366 + patch: + summary: Update alias of a device in a customer profile. + description: Update alias of a device in a customer profile. + tags: + - Devices + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Update alias of a device: + value: + { + "alias": "My old iPhone 13", + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Device alias updated in customer profile: + value: + { + "deviceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366", + "externalDeviceId": "dee7d80e-9288-4508-a3ed-c067e619179f", + "alias": "My old iPhone 13", + } + delete: + summary: Delete a device from a customer profile. + description: Delete a device from a customer profile. + tags: + - Devices + responses: + "200": + description: OK components: schemas: unavailable: @@ -3471,27 +3580,6 @@ components: country: type: string example: NL - _links: - type: object - properties: - self: - type: object - properties: - href: - type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/addresses/1 - method: - type: string - example: GET - delete_address: - type: object - properties: - href: - type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/addresses/1 - method: - type: string - example: DELETE phones: type: array items: @@ -3518,24 +3606,56 @@ components: countryCode: type: string example: "0031" + devices: + type: array + items: + type: object + properties: + deviceId: + type: integer + example: 1 + deviceType: + type: object + properties: + deviceTypeId: + type: integer + example: 1 + name: + type: string + example: iOS + pushToken: + type: string + example: abcdef123456 + isPreferred: + type: boolean + example: true _links: type: object properties: - self: + add_device: type: object properties: href: type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/phones/1 + example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/devices method: type: string - example: GET - delete_phone: + example: POST + edit_device: type: object properties: href: type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/phones/1 + example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/devices/1 + method: + type: string + example: PATCH + delete_device: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/devices/1 method: type: string example: DELETE @@ -3551,16 +3671,6 @@ components: method: type: string example: GET - create_customer_status: - type: object - description: ONLY ALLOWED FOR SMP - Create a new customer status - properties: - href: - type: string - example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/statuses - method: - type: string - example: POST partial_edit: type: object properties: