Skip to content

Instantly share code, notes, and snippets.

@juque
Created September 24, 2021 02:39
Show Gist options
  • Save juque/a83acf56dbd42bc9201c9279396cf222 to your computer and use it in GitHub Desktop.
Save juque/a83acf56dbd42bc9201c9279396cf222 to your computer and use it in GitHub Desktop.
Bootic promotion API result
{
"_actions": {
"search": {
"fields": [
{
"name": "page",
"options": null,
"prompt": "page number",
"value": null
},
{
"name": "per_page",
"options": null,
"prompt": "items per page",
"value": null
},
{
"name": "created_on_gte",
"options": null,
"prompt": "creation date from",
"value": null
},
{
"name": "created_on_lte",
"options": null,
"prompt": "creation date to",
"value": null
},
{
"name": "updated_on_gte",
"options": null,
"prompt": "update date from",
"value": null
},
{
"name": "updated_on_lte",
"options": null,
"prompt": "update date to",
"value": null
},
{
"name": "q",
"options": null,
"prompt": "search by name",
"value": null
},
{
"name": "available",
"options": null,
"prompt": "filter available ones or not",
"value": null
},
{
"name": "activation_mode",
"options": [
"code",
"auto",
"fulfillment",
"payment"
],
"prompt": "Activation mode",
"value": null
},
{
"name": "discount_type",
"options": [
"fixed",
"percentage",
"free-shipping"
],
"prompt": "discount_type",
"value": null
},
{
"name": "discount_gte",
"options": null,
"prompt": "discount_gte",
"value": null
},
{
"name": "discount_lte",
"options": null,
"prompt": "discount_lte",
"value": null
},
{
"name": "payment_method_id",
"options": null,
"prompt": "filter by payment_method_id",
"value": null
},
{
"name": "shipping_option_id",
"options": null,
"prompt": "filter by shipping_option_id",
"value": null
},
{
"name": "price_list_id",
"options": null,
"prompt": "filter by price_list_id",
"value": null
},
{
"name": "product_group",
"options": null,
"prompt": "product_group_type:product_group_id",
"value": null
},
{
"name": "sort",
"options": [
"created_on.asc",
"created_on.desc",
"updated_on.asc",
"updated_on.desc",
"name.asc",
"name.desc"
],
"prompt": "sort results",
"value": null
}
],
"href": "https://api.bootic.net/v1/shops/238/promotions",
"method": "GET",
"prompt": "Search and filter promotions",
"type": "application/json"
}
},
"_class": [
"results",
"promotions"
],
"_embedded": {
"items": [
{
"_class": [
"promotion"
],
"_links": {
"btc:delete_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17527",
"method": "destroy"
},
"btc:update_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17527",
"method": "put"
},
"self": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17527"
}
},
"activation_mode": "code",
"code": "jp123-iii",
"cumulative": true,
"discount": 5000,
"discount_type": "fixed",
"expires_at": "2021-11-01T02:59:59.000Z",
"id": 17527,
"name": "Promo Juan Perez III",
"per_user_limit": 1,
"price_list_id": null,
"price_range_from": null,
"price_range_to": null,
"product_group_filter_mode": "all",
"product_group_id": null,
"product_group_type": "Collection",
"product_range_from": null,
"product_range_to": null,
"starts_at": null,
"usage_count": 0,
"usage_limit": 1
},
{
"_class": [
"promotion"
],
"_links": {
"btc:delete_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17526",
"method": "destroy"
},
"btc:update_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17526",
"method": "put"
},
"self": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17526"
}
},
"activation_mode": "code",
"code": "jp123-ii",
"cumulative": true,
"discount": 5000,
"discount_type": "fixed",
"expires_at": "2021-11-01T00:00:00.000Z",
"id": 17526,
"name": "Promo Juan Perez II",
"per_user_limit": 1,
"price_list_id": null,
"price_range_from": null,
"price_range_to": null,
"product_group_filter_mode": "all",
"product_group_id": null,
"product_group_type": "Collection",
"product_range_from": null,
"product_range_to": null,
"starts_at": null,
"usage_count": 0,
"usage_limit": 1
},
{
"_class": [
"promotion"
],
"_links": {
"btc:delete_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17525",
"method": "destroy"
},
"btc:update_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17525",
"method": "put"
},
"self": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17525"
}
},
"activation_mode": "code",
"code": "jp123",
"cumulative": true,
"discount": 5000,
"discount_type": "fixed",
"expires_at": null,
"id": 17525,
"name": "Promo Juan Perez",
"per_user_limit": 1,
"price_list_id": null,
"price_range_from": null,
"price_range_to": null,
"product_group_filter_mode": "all",
"product_group_id": null,
"product_group_type": "Collection",
"product_range_from": null,
"product_range_to": null,
"starts_at": null,
"usage_count": 0,
"usage_limit": 1
},
{
"_class": [
"promotion"
],
"_links": {
"btc:delete_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17234",
"method": "destroy"
},
"btc:update_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17234",
"method": "put"
},
"self": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17234"
}
},
"activation_mode": "code",
"code": "promo999",
"cumulative": true,
"discount": 10,
"discount_type": "percentage",
"expires_at": null,
"id": 17234,
"name": "Super promo",
"per_user_limit": null,
"price_list_id": null,
"price_range_from": null,
"price_range_to": null,
"product_group_filter_mode": "all",
"product_group_id": null,
"product_group_type": null,
"product_range_from": null,
"product_range_to": null,
"starts_at": "2021-08-17T16:46:00.000Z",
"usage_count": 0,
"usage_limit": null
},
{
"_class": [
"promotion"
],
"_links": {
"btc:delete_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17046",
"method": "destroy"
},
"btc:update_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17046",
"method": "put"
},
"self": {
"href": "https://api.bootic.net/v1/shops/238/promotions/17046"
}
},
"activation_mode": "auto",
"cumulative": true,
"discount": 50,
"discount_type": "percentage",
"expires_at": null,
"id": 17046,
"name": "super ollas",
"per_user_limit": null,
"price_list_id": null,
"price_range_from": null,
"price_range_to": null,
"product_group_filter_mode": "all",
"product_group_id": 98319,
"product_group_type": "Collection",
"product_range_from": null,
"product_range_to": null,
"starts_at": "2021-07-30T16:54:00.000Z",
"usage_count": 1,
"usage_limit": null
}
]
},
"_links": {
"btc:create_promotion": {
"href": "https://api.bootic.net/v1/shops/238/promotions",
"method": "post",
"title": "Create a new promotion for this shop"
},
"btc:shop": {
"href": "https://api.bootic.net/v1/shops/238",
"title": "translation missing: es.rels.titles.promotions_shop"
},
"curies": [
{
"href": "https://api.bootic.net/rels/{rel}",
"name": "btc",
"templated": true
}
],
"self": {
"href": "https://api.bootic.net/v1/shops/238/promotions?available=true&page=1&per_page=30&sort=created_on.desc"
}
},
"page": 1,
"per_page": 30,
"total_items": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment