Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CO-2702 Update catalog documentation with array type support examples. #7663

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,34 @@ curl --location --request PATCH 'https://rest.iad-03.braze.com/catalogs/restaura
"Latitude": 33.6112,
"Longitude": -117.8711
},
"Top_Dishes": {
"$add": [
davehensley marked this conversation as resolved.
Show resolved Hide resolved
"Biscuits",
"Coleslaw"
],
"$remove": [
"French Fries"
]
},
"Open_Time": "2021-09-03T09:03:19.967+00:00"
},
{
"id": "restaurant3",
"City": "San Francisco",
"Rating": 2
"Rating": 2,
"Top_Dishes": [
"Buffalo Wings",
"Philly Cheesesteak"
]
}
]
}'
```

{% alert note %}
The `$add` and `$remove` operators are only applicable to array type fields, and are only supported by PATCH endpoints.
{% endalert %}

## Response

There are three status code responses for this endpoint: `202`, `400`, and `404`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ curl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restauran
"Latitude": 33.6112,
"Longitude": -117.8711
},
"Top_Dishes": [
"Hamburger",
"Deluxe Cheeseburger"
],
"Created_At": "2022-11-01T09:03:19.967+00:00"
},
{
Expand All @@ -75,6 +79,10 @@ curl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restauran
"Latitude": 40.7413,
"Longitude": -73.9764
},
"Top_Dishes": [
"Hot Dog",
"French Fries"
],
"Created_At": "2022-11-02T09:03:19.967+00:00"
},
{
Expand All @@ -88,6 +96,10 @@ curl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restauran
"Latitude": 40.7489,
"Longitude": -73.9972
},
"Top_Dishes": [
"Buffalo Wings",
"Philly Cheesesteak"
],
"Created_At": "2022-11-03T09:03:19.967+00:00"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,20 @@ curl --location --request PUT 'https://rest.iad-03.braze.com/catalogs/restaurant
"Latitude": 33.6112,
"Longitude": -117.8711
},
"Top_Dishes": [
"Hamburger",
"Deluxe Cheeseburger"
],
"Open_Time": "2021-09-03T09:03:19.967+00:00"
},
{
"id": "restaurant3",
"City": "San Francisco",
"Rating": 2
"Rating": 2,
"Top_Dishes": [
"Hot Dog",
"French Fries"
]
}
]
}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,25 @@ curl --location --request PATCH 'https://rest.iad-03.braze.com/catalogs/restaura
"Latitude": 33.6112,
"Longitude": -117.8711
},
"Top_Dishes": {
"$add": [
"Biscuits",
"Coleslaw"
],
"$remove": [
"French Fries"
]
},
"Open_Time": "2021-09-03T09:03:19.967+00:00"
}
]
}'
```

{% alert note %}
The `$add` and `$remove` operators are only applicable to array type fields, and are only supported by PATCH endpoints.
{% endalert %}

## Response

There are three status code responses for this endpoint: `200`, `400`, and `404`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ curl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restauran
"Latitude": 33.6112,
"Longitude": -117.8711
},
"Top_Dishes": [
"Hamburger",
"Deluxe Cheeseburger"
],
"Created_At": "2022-11-01T09:03:19.967+00:00"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ curl --location --request PUT 'https://rest.iad-03.braze.com/catalogs/restaurant
"Latitude": 33.6112,
"Longitude": -117.8711
},
"Top_Dishes": [
"Hamburger",
"Deluxe Cheeseburger"
],
"Open_Time": "2021-09-03T09:03:19.967+00:00"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ curl --location --request POST 'https://rest.iad-03.braze.com/catalogs' \
"name": "Location",
"type": "object"
},
{
"name": "Top_Dishes",
"type": "array"
},
{
"name": "Created_At",
"type": "time"
Expand Down Expand Up @@ -134,6 +138,10 @@ The status code `201` could return the following response body.
"name": "Location",
"type": "object"
},
{
"name": "Top_Dishes",
"type": "array"
},
{
"name": "Created_At",
"type": "time"
Expand Down