The offer for the client may include an attachment, so here we can generate a link to this attachment
Table of contents
Glossary
Name | Explanation |
offerId | identifier of offer |
attachmentId | identifier of attachment (it is possible to download it from the offer details) |
GET generate url to offer attachment
In order to get generate url to offer attachment use GET
/api/v1/orderpath/integrations/auth-required/offers/{offerId}/attachments/{attachmentId}/download-url
using specific ID of offer and attachment. The diagram below shows the dependence of communicating with the API:Use the parameter in query below to get information link to specified attachment of offer which was sent to the customer:
offerId
attachmentId
jsoncurl -X GET "https://api-preprod.one.unity.pl/api/v1/orderpath/integrations/auth-required/offers/854fd3a1-cc26-47a4-8c5d-df1e9d0dd3a0/attachments/2342524b-8d1a-4e53-976c-c00c0d2d82d1/download-url" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive url to attachment of offer
Example response:
json{ "downloadUrl": "https://[link]" }
PUT - offer transfer failed
In case of failure to transfer the offer to the external system, you can return the reason for this failure. Use for PUT
/api/v1/orderpath/integrations/auth-required/offers/{offerId}/transfer-failed
using offer identifier.The sequence diagram below shows the process: Use the parameter in query below to return information about an error:
offerId
Example request:
jsoncurl -X PUT "https://api-preprod.one.unity.pl/api/v1/orderpath/integrations/auth-required/carts/c2c25ae9-dbcf-43bb-9626-ee1f5ae174ea/add-configurable-products" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -d " { "reason": "example text" }