You can modify or update a fallback offer in your container by making a PATCH request to the Offer Library API.
For more information on JSON Patch, including available operations, see the official JSON Patch documentation.
The following table shows the valid values which comprise the Content-Type and Accept fields in the request header:
Header name | Value |
---|---|
Content-Type | application/json |
API format
PATCH /{ENDPOINT_PATH}/{CONTAINER_ID}/instances/{INSTANCE_ID}
Parameter | Description | Example |
---|---|---|
{ENDPOINT_PATH} |
The endpoint path for repository APIs. | https://platform.adobe.io/data/core/xcore/ |
{CONTAINER_ID} |
The container where the fallback offers are located. | e0bd8463-0913-4ca1-bd84-6309134ca1f6 |
{INSTANCE_ID} |
The instance id of the fallback offer. | b3966680-13ec-11eb-9c20-8323709cfc65 |
Request
curl -X PATCH 'https://platform.adobe.io/data/core/dps/offers/fallbackOffer1234?offer-type=fallback' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-d '[
{
"op": "replace",
"path": "/name",
"value": "Updated fallback offer"
},
{
"op": "replace",
"path": "/description",
"value": "Updated fallback offer description"
}
]'
Parameter | Description |
---|---|
op |
The operation call used to define the action needed to update the connection. Operations include: add , replace , and remove . |
path |
The path of the parameter to be updated. |
value |
The new value you want to update your parameter with. |
Response
A successful response returns the updated details of the fallback offer, including its unique instance id
.
{
"id": "{ID}",
"datasetId": "{DATASET_ID}",
"sandboxId": "{SANDBOX_ID}",
"etag": 2,
"createdDate": "2023-09-07T12:47:43.012Z",
"lastModifiedDate": "2023-09-07T12:47:43.012Z",
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"createdByClientId": "{CREATED_CLIENT_ID}",
"lastModifiedByClientId": "{MODIFIED_CLIENT_ID}"
}