What we'll cover:
Extra:
Get products from the catalog
To get your order request ready you need to know the products available in the SwagUp catalog. These products are grouped into categories, and you can also dynamically get prices based on quantities and the number of colors on your design.
To obtain the list of products available in the catalog, you can make a GET
request to:
https://api.swagup.com/form-api/v1/categories/
Example response*:
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 32,
"CatName": "Packaging",
"icon": "https://swagup-static.swagup.com/platform/media/form/packaging.svg",
"iconActive": "https://swagup-static.swagup.com/platform/media/form/packaging-blue.svg",
"items": [
{
"id": 329,
"name": "Plain Mailer Boxes",
"description": "Send you swag in style with this sleek, white, tab-locking mailer box. \r\n\r\nItem Details:\r\n- 13\" x 10\" x 4\"",
"img": "https://swagup-static.swagup.com/platform/media/form/products/01t5A000007y53qQAA/01t5A000007y53qQAA-1587132467097.png",
"price": "3.00",
"inCart": false,
"sort_order": 1,
"available_colors": [
{
"label": "18 x 12 x 6 White",
"color": "FFFFFF",
"image": "https://swagup-static.swagup.com/platform/media/form/Screen_Shot_2021-04-22_at_1.41.54_PM.png"
},
{
"label": "14 x 10 x 4 White",
"color": "FFFFFF",
"image": "https://swagup-static.swagup.com/platform/media/form/Screen_Shot_2021-04-22_at_1.54.21_PM.png"
}
],
"supplier_template": null,
"show_in_bulk_experience": false,
"show_in_pack_experience": false,
"items_per_carton": null,
"carton_parcel_id": null,
"height": null,
"weight": null,
"width": null,
"length": null,
"product_type": 1
}
],
"label": "First up, pick your <span style=\"font-family: Futura; font-weight: bold\">packaging!</span>",
"is_bonus": false,
"sort_order": 1
},
{
"id": 20,
"CatName": "Water bottles",
"icon": "https://swagup-static.swagup.com/platform/media/form/water-bottles_xhztx6K.svg",
"iconActive": "https://swagup-static.swagup.com/platform/media/form/water-bottles_QDhQYe0.svg",
"items": [
{
"id": 61,
"name": "The Elevate Bottle - 27 oz.",
"description": "This BPA-free bottle features a 27 oz, single wall with a threaded, two-tone lid. \r\n\r\nItem Details: \r\n- 10-3/8\" x 2-7/8\"",
"img": "https://swagup-static.swagup.com/platform/media/form/products/01t5A000007y45LQAQ/01t5A000007y45LQAQ.png",
"price": "7.67",
"inCart": false,
"sort_order": 1,
"available_colors": [
{
"label": "blue",
"color": "31395F",
"image": "https://swagup-static.swagup.com/platform/media/form/0685A000007TtlOQAS_Huf2DlG.png"
}
],
"supplier_template": "https://swagup-static.swagup.com/platform/media/form/templates/0685A00000BKK3eQAH_h6oTXbO.png",
"show_in_bulk_experience": true,
"show_in_pack_experience": true,
"items_per_carton": null,
"carton_parcel_id": null,
"height": null,
"weight": null,
"width": null,
"length": null,
"product_type": 1
}
],
"label": "Would you like to add <span style=\"font-family: Futura; font-weight: bold\">water bottles</span> to your packs?",
"is_bonus": false,
"sort_order": 2
}
]
}
* The response examples in this guide have been truncated to show less data
In this response, you want to pay special attention to the products id
, which will allow you to get prices and submit an order.
Get pack price on demand
Now that you know the products in the catalog, you can get prices. Prices depend on quantities and the number of colors that are going to be present in the design. You should know that these prices are an estimate, and are subject to change during the design phase when color and quantity changes are requested.
To get pack prices you can make a POST
request to:
https://api.swagup.com/form-api/v1/pack-multiple-price/
For this request, you need to include information about the products in the pack.
Example payload:
{
"products": [
{
"item_id": 329,
"units_per_pack": 1,
"colors": 1
},
{
"item_id": 61,
"units_per_pack": 1,
"colors": 2
}
],
"quantities": [
{
"quantity": 100
}
]
}
This payload states that you want to get prices for two products: 329
(Plain Mailer Boxes) and 61
(The Elevate Bottle - 27 oz.). There will be only one of them in each pack (units_per_pack
). Also, the product 61
will have 2 colors in its design, and the price for 100 packs is being requested.
Example response:
{
"quantities": [
{
"quantity": 100,
"price": "12.47"
}
],
"products": [
{
"item_id": "329",
"units_per_pack": 1,
"colors": 1,
"prices": [
{
"quantity": 100,
"price": "3.00"
}
]
},
{
"item_id": "61",
"units_per_pack": 1,
"colors": 2,
"prices": [
{
"quantity": 100,
"price": "9.47"
}
]
}
]
}
This response is similar to the request, but you'll get a price
key within the quantities
key that holds the price for each pack if requesting 100 packs. Additionally, the price of each product is present.
Submit an order request
The next step, after you are certain of your order (you know which products are being requested, their quantities, and colors), is to submit the order request. Such request does not include payment. This will trigger mockups designs request, for which you will receive an email notification when they are ready. Part of the request is to include the logo you want to put in your swag. To upload your logo, there is an available AWS S3 bucket that our system will pull the images from. The AWS S3 bucket is https://swagup-order-req-resources.s3.amazonaws.com.
To submit an order request you must make a POST
request to:
https://api.swagup.com/form-api/v1/orders/
Example payload:
{
"form_type": "Pack",
"type": 2,
"full_name": "John Doe",
"work_email": "john_doe@email.com",
"company": "My Awesome Company",
"inhands_date": "2021-09-23",
"comments": "Some comment you want to add",
"phone": "+11111111111",
"pack_quantity": "100",
"cart_quantity": "100",
"pack_budget": "12",
"number_of_colors": 2,
"resources": [
{
"resource_path": "https://swagup-resource-uploader.s3.amazonaws.com/your_logo_here.png"
}
],
"items": [
{
"item": 144,
"quantity": 1,
"selected_color": "Navy Blue",
"selected_color_hex": "#000080"
},
{
"item": 61,
"quantity": 1,
"selected_color": "Green",
"selected_color_hex": "#3D8A47"
}
]
}
Let's take a closer look at this payload. Here, we have the basic information you must fill in for your order. The pack_quantity
represents how many packs you will order each year and the cart_quantity
how many you want to request at the moment. You must also provide the products you want to include in the pack, including them under the items
key, specifying the item
id, the quantity
, and the selected color. The colors can be pulled from the product specs on the catalog under the available_colors
key (you can choose not to send these colors).
That's it! ๐. With this, you have submitted your order request. You will receive an email confirming your order request.
Review and approve designs
The next step to move forward with your order request is to review and approve the mock-ups for your selected products. You need to obtain the orders requested under your account. For this, make a GET
request to:
https://api.swagup.com/api/v1/opportunities/
This will return the list of orders that have been requested on your account. If you want to list only the ones that contain products that still need approval, include the query parameter proofs_only=1
like this:
https://api.swagup.com/api/v1/opportunities/?proofs_only=1
Example response*:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 9901,
"date": "2021-08-26",
"products": [
{
"id": 10635,
"opportunity": 9901,
"product": {
"id": 24386,
"description": null,
"name": "Pack 8/26/2021",
"image": null,
"sort_order": 1,
"record_type": "Pack",
"status": "Pending Mockup",
"created_at": "2021-08-26T11:55:04Z",
"modified_on": "2021-08-26T15:55:12.052197Z",
"items": [
{
"product": {
"id": 24385,
"description": "This BPA-free bottle features a 27 oz, single wall with a threaded, two-tone lid. \r\n\r\nItem Details: \r\n- 10-3/8\" x 2-7/8\"",
"name": "The Elevate Bottle",
"image": null,
"price": 8.94,
"sort_order": 1,
"record_type": "Product",
"status": "Pending Mockup",
"is_apparel": false,
"created_at": "2021-08-26T11:55:01Z",
"modified_on": "2021-08-26T15:55:10.948178Z",
"enabled": true,
"can_ship_international": true,
"base_product": 61
},
"units_per_pack": 1
},
{
"product": {
"id": 24387,
"description": "Firmly nestle your swag in place with this interlocking crinkle-cut fill.",
"name": "Crinkle Cut Fill",
"image": null,
"price": 3,
"sort_order": 1,
"record_type": "Product",
"status": "Pending Mockup",
"is_apparel": false,
"created_at": "2021-08-26T11:55:01Z",
"modified_on": "2021-08-26T15:55:13.191680Z",
"enabled": true,
"can_ship_international": false,
"base_product": 144
},
"units_per_pack": 1
}
],
"minimum_to_reorder": 50,
"storage_category": 1,
"enabled": true,
"can_ship_international": true,
"standard_turnaround_time": 18,
"rush_turnaround_time": 15,
"rush_production": true,
"base_product": null,
"available_imprint_options": null,
"decorations": null
},
"sizes": [
{
"size": {
"id": 9,
"name": "One Size",
"category": "Generic",
"modified_on": "2019-09-11T04:24:42.848470Z",
"sort_order": 1
},
"quantity": 100,
"price": "11.94",
"rush_fee": "0.00"
}
],
"status": "Pending Mockup",
"total": 1194,
"tax": 0,
"total_plus_tax": 1194,
"production_time": "Standard",
"rush_production": true,
"created_at": "2021-08-26T11:55:06Z",
"price": "11.94",
"rush_fee": "0.00"
}
],
"total_packs": 100,
"total_shipping": 0,
"total_warehouses": 0,
"total": "1194.00",
"opp_no": "My Awesome Account - 8/26/2021 11:55 AM",
"tax": "0.00",
"total_plus_tax": "1194.00",
"modified_on": "2021-08-26T15:55:11.211591Z",
"status": "In Design"
}
]
}
* The response examples in this guide have been truncated to show less data. Products on example payload may not be related to previous example payloads
Here you can look for your orders request and see the id
of the order you want to process. To get an individual order request you can make a GET
request to:
https://api.swagup.com/api/v1/opportunities/9901/
We have, at top-level, the information about the order requested: Its products (products
), pack quantity (total_packs
), the total amount of the order (total_plus_tax
), and the status
of the order. Once this order status changes to Design Ready
you will receive an email notification letting you know that the mock-ups are ready. Pay attention to the status of each individual product inside the pack (In the key items
inside the products
key).
Approving designs
Once you've received the email informing that the mock-ups are ready, you can move on to approving the designs. For this, first, make sure you approve the designs by getting the products mockup. Get the products mock-up id
from the previous endpoint under the products
key and make a GET
request to:
https://api.swagup.com/api/v1/proofs/10635/
This will give you a response similar to each element in the products
list on the previous example response. It will hold a product
key, and it will have the list of products inside the pack on the items
key. Each element holds a product
key, that has all the product information, including an image
key with a URL that you can download to look at the mockup.
Example image:
If you are satisfied with the design, then it is time to approve it. For this, use the id
of each product in the items
key to make a PATCH
request to:
https://api.swagup.com/api/v1/account-products/24385/
Example payload:
{
"status": "Production Request"
}
Doing this for every product inside the pack will move the order request to the next status: Finalizing Proofs
.
At this point, you will receive an email letting you know when your final proofs are ready so you can approve them and place the order ๐.
Once you received the order you must give final approval to the proofs. For this, use the same endpoint as before, but use the following payload:
Example payload:
{
"status": "Approved"
}
Change pack quantities
At some point, you may want to change the quantities of your order*, as well as the size breakdown (if there is an apparel product). You must keep in mind that each product has a minimum value allowed to place an order, so the new quantity you provide must be higher than that number (under the minimum_to_reorder
key on the product information). Also, changing the quantities will probably change the price of the products, and hence the price of the order.
To change the quantities on the order, you must make a PUT
request to:
https://api.swagup.com/api/v1/opportunities/9901/proofs/
Example payload:
[
{
"id": 10635,
"production_time": "Standard",
"sizes": [
{
"size": 9,
"quantity": 200
}
]
}
]
This will change the quantity of the proof with id: 10635
to 200. This id
can be obtained the same way that was explained before. You may have noticed that size
is represented by an integer value. You can find a map of values here.
*You can make as many quantity changes as needed.
After this, you are all set to place your order ๐ฆ
Place the order
Now that we have approved your proofs, we are left to finish this journey and place an order. Once produced, these products will be held in our warehouse for you to send them on demand. We charge an amount for holding items in the warehouse, thus this charge will be included in the order invoice. We will charge a one-time warehouse fee of $4.00 per swag pack.
To get the final quote, make sure to make a GET
a request to:
https://api.swagup.com/api/v1/opportunities/9901/
The response will include the total_plus_tax
key with the updated value according to the current quantities changes.
Example response*:
...
"total_plus_tax": "2206.00",
...
* The response examples in this guide have been truncated to show less data.
โ Note: Be aware that on top of total_plus_tax
there will be a warehouse fee of $4.00 per swag pack (i.e. 200 * $4.00 = $ 800.00)
Check inventory availability
You can check your inventory at any given moment using the SwagUp API. For this, you just need to make a GET
request to:
https://api.swagup.com/api/v1/account-products/?visible_in_inventory=true
From this request, you will get all the products and their inventory. This helps you decide whether you need to reorder a product again, in case you are running out of stock; and you'll know which product you can send.
Example response*:
{
"id": 22615,
"description": null,
"image": "https://swagup-static.swagup.com/platform/media/accounts/account_3963/account-products/p22615-1627572695317.png",
"sort_order": 1,
"record_type": "Pack",
"stock": [
{
"size": {
"id": 3,
"name": "M",
"category": "Apparel",
"modified_on": "2020-10-22T22:38:19.169442Z",
"sort_order": 4
},
"quantity": 50,
"minimum": 1,
"modified_on": "2021-07-16T15:30:03.638223Z"
},
{
"size": {
"id": 4,
"name": "L",
"category": "Apparel",
"modified_on": "2020-10-22T22:38:26.821228Z",
"sort_order": 5
},
"quantity": 55,
"minimum": 1,
"modified_on": "2021-07-16T15:30:05.515597Z"
}
],
"status": "Approved",
"created_at": "2021-07-16T11:29:51Z",
"created_by": null,
"modified_on": "2021-07-16T15:30:03.106336Z",
"modified_by": null,
"theme_color": null,
"theme_color_hex": null,
"items": [
{
"product": {
"id": 22610,
"description": "High quality vinyl stickers from Stickermule. Weatherproof and tear-proof mean these stickers will last a lifetime. It's always worth it to throw 2 or 3 of these in a pack!",
"name": "Die Cut Stickers - 6 square inches",
"image": "https://swagup-static.swagup.com/platform/media/accounts/account_3963/account-products/p22610-1626449410139.png",
"price": "0.00",
"sort_order": 1,
"record_type": "Product",
"status": "Approved",
"is_apparel": false,
"created_at": "2021-07-16T11:29:43Z",
"created_by": null,
"modified_on": "2021-07-16T15:30:02.269078Z",
"modified_by": null,
"theme_color": "Full Color",
"theme_color_hex": "FFFFFF",
"primary_color_requirement": null,
"secondary_color_requirement": null,
"enabled": true,
"can_ship_international": true,
"base_product": 129,
"available_colors": [
{
"id": 33489,
"name": "Full Color",
"product_code": "Die Cut Stickers",
"group_color": "White",
"hex_color": "FFFFFF"
}
],
"available_imprint_options": [
"Full Color"
],
"decorations": [
{
"Artwork2": "",
"Artwork1": "",
"Colors": [
"black",
"darkcyan"
],
"Notes": "",
"Dimensions": "1.51x1.65",
"Location": "Front",
"Imprint_Type": "Full Color",
"Artwork2_S3_Location": "",
"Artwork1_S3_Location": "",
"Name": "D-82590"
}
]
},
"units_per_pack": 1
}
],
"is_apparel": true,
"minimum_to_reorder": 50,
"standard_turnaround_time": 45,
"rush_turnaround_time": 24,
"name": "Pack 7/16/2021",
"visible_in_inventory": true,
"enabled": true,
"storage_category": 1,
"can_ship_international": true,
"decorations": null,
"product_type": 1,
"rush_production": true
}
* The response examples in this guide have been truncated to show less data.
You can check information about every product available. Under the stock
key you'll find the stock quantities breakdown for each size available for each product.
Example:
{
"size": {
"id": 3,
"name": "M",
"category": "Apparel",
"modified_on": "2020-10-22T22:38:19.169442Z",
"sort_order": 4
},
"quantity": 50,
"minimum": 1,
"modified_on": "2021-07-16T15:30:03.638223Z"
}
In the previous example, we have 50 units available for the M size.
Send swag from inventory
One of the key features of the SwagUp API is to send swag on-demand from inventory. For this, you can make a POST
request to:
https://api.swagup.com/api/v1/employee-orders/
You need to include shipping information, and the product to send with its quantities. For this, you need to create a payload like the following
Example payload:
[
{
"employee": {
"first_name": "John",
"last_name": "Doe",
"email": "john_doe@email.com",
"title": "Engineer",
"phone_number": "+11111111111",
"shipping_country": "US",
"shipping_state": "NJ",
"shipping_city": "Union City",
"shipping_zip": "07087",
"shipping_address1": "2607 New York Ave"
},
"products": [
{
"product": 22691,
"sizes": [
{
"size": 3,
"quantity": 1
}
]
}
],
"shipping_date": "2021-09-20",
"express": false
]
This will create a shipment that will be sent on the specified shipping_date
to the provided shipping address. The express
key controls whether you want to use an express delivery method or not. You will get a response like the following:
Example response*:
[
{
"id": 96228,
"employee": {
"id": 133807,
"title": null,
"first_name": "John",
"last_name": "Doe",
"birth_date": null,
"shipping_address1": "2607 New York Ave",
"shipping_address2": null,
"shipping_city": "Union City",
"shipping_state": "NJ",
"shipping_zip": "07087",
"shipping_country": "US",
"size": null,
"external_id": null,
"photo": null,
"email": "john_doe@email.com",
"phone_number": "+17862547896",
"created_at": "2021-08-31T21:18:17.268713Z",
"modified_on": "2021-08-31T21:18:17.281330Z",
"source": null,
"redacted": false,
"account": 3963
},
"date": "2021-08-31",
"status": "Scheduled",
"tracking": null,
"products": [
{
"product": {
"id": 22691,
"description": null,
"name": "Pack 7/19/2021",
"image": "https://swagup-static.swagup.com/platform/media/accounts/account_3963/account-products/p22691-1626735771014.png",
"price": "78.10",
"sort_order": 1,
"record_type": "Pack",
"status": "Approved",
"is_apparel": true,
"created_at": "2021-07-19T18:15:44Z",
"created_by": null,
"modified_on": "2021-07-19T23:04:23.637354Z",
"modified_by": null,
"theme_color": null,
"theme_color_hex": null,
"primary_color_requirement": null,
"secondary_color_requirement": null,
"enabled": true,
"can_ship_international": true,
"base_product": null,
"available_colors": [],
"available_imprint_options": null,
"standard_turnaround_time": 52,
"rush_turnaround_time": 27,
"decorations": null
},
"quantity": 1,
"size": {
"id": 3,
"name": "M",
"category": "Apparel",
"modified_on": "2020-10-22T22:38:19.169442Z",
"sort_order": 4
},
"price": "78.10",
"total": 78.1,
"production_time": "Standard"
}
],
"tracking_url": null,
"order_no": null,
"shipping_date": "2021-09-20",
"shipping_notes": null,
"modified_on": "2021-08-31T21:22:41.412345Z",
"source": null,
"total_shipping": "12.00",
"shipping": "12.00",
"tax": "0.00",
"delivery_method": {
"id": 1,
"name": "Standard",
"turnaround_time_min_days": 3,
"turnaround_time_max_days": 5,
"turnaround_time": "3-5 business days",
"country": "US"
},
"shipping_first_name": "John",
"shipping_last_name": "Doe",
"shipping_address1": "2607 New York Ave",
"shipping_address2": null,
"shipping_city": "Union City",
"shipping_state": "NJ",
"shipping_zip": "07087",
"shipping_country": "US",
"status_detail": null,
"status_updated_at": null,
"external_id": null,
"redacted": false,
"invalid_address_error_message": null,
"total_fulfillment": 0,
"is_paid": true,
"phone_number": "+17862547896"
}
]
* The response examples in this guide have been truncated to show less data.
The value of the shipment will be reflected on the total_shipping
key. This amount will be subtracted from your credit balance. See here how to compute shipping prices beforehand.
Extra
Next, we show some extra features you are able to use with the SwagUp API.
Calculate shipping prices
The SwagUp API provides a shipping price calculator to compute how much shipping will cost for a specific product to a specific address. For this, make a POST
request to:
https://api.swagup.com/api/v1.01/shipping-prices/
Example request:
{
"quantities": [
{
"account_product": 22691,
"quantity": 1
}
],
"shipping_country": "US",
"shipping_state": "NJ",
"shipping_city": "Union City",
"shipping_zip": "07087",
"shipping_address1": "2607 New York Ave"
}
This will compute how much shipping costs to send the product 22691
to the address provided.
Example response*:
{
"delivery_methods": [
{
"id": 1,
"name": "Standard",
"turnaround_time_min_days": 3,
"turnaround_time_max_days": 5,
"turnaround_time": "3-5 business days",
"prices": {
"shipping_method": null,
"breakdown": [
{
"total_price": 12
}
],
"total_price": 12,
"total_packages": 1
}
},
{
"id": 3,
"name": "Express",
"turnaround_time_min_days": 1,
"turnaround_time_max_days": 1,
"turnaround_time": "1 business day",
"prices": {
"shipping_method": null,
"breakdown": [
{
"total_price": 16
}
],
"total_price": 16,
"total_packages": 1
}
}
]
}
* The response examples in this guide have been truncated to show less data.
The response gives you total_price
for each delivery method. This is the cost of shipping for the provided information.
Receive swag delivery status updates
You can use the SwagUp API to receive webhook notifications anytime a shipment delivery status changes. For this, you must register a webhook by making a POST
request here:
https://api.swagup.com/core/api/v1/webhooks/
Example payload:
{
"event": "directory_order.changed",
"target": "{{url}}"
}
This will register a webhook notification that will trigger a request to {{url}}
whenever a shipment status changes. If the registration was successful, you will get a response like this:
Example response*:
{
"id": 199,
"created": "2020-06-24T13:31:59.830219Z",
"updated": "2020-06-24T13:31:59.830264Z",
"event": "directory_order.changed",
"target": "{{url}}",
"is_active": true,
"user": 494
}
* The response examples in this guide have been truncated to show less data.
After subscription, a POST
request will be made to {{url}}
once a shipment status changes. The request payload will be similar to this:
Example payload:
{
"hook": {
"id": 199,
"event": "directory_order.changed",
"target": "{{url}}"
},
"data": {
"id": 3267,
"employee": {
"id": 3011,
"title": "Developer",
"first_name": "John",
"last_name": "Doe",
"birth_date": "1990-06-19",
"shipping_address1": "2607 New York Ave",
"shipping_address2": null,
"shipping_city": "Union City",
"shipping_state": "NJ",
"shipping_zip": "07087",
"shipping_country": "US",
"size": {
"id": 3,
"name": "M",
"category": "Apparel",
"modified_on": "2019-12-11T14:30:21.924795Z",
"sort_order": 4
},
"external_id": null,
"photo": null,
"email": "john.doe@mail.com",
"phone_number": "+1111111111",
"created_at": "2020-06-22T22:46:45.296906Z",
"modified_on": "2020-06-22T22:46:45.296906Z",
"source": null
},
"date": "2020-06-22",
"status": "Delivered",
"status_detail": "arrived_at_destination",
"status_updated_at": "2020-07-09T18:24:20Z",
"tracking": "EZ4000000004",
"products": [
...
],
"tracking_url": "https://track.easypost.com/EZ4000000004",
"order_no": "EO-20200622-00003267",
"shipping_date": "2020-06-28",
"shipping_notes": "",
"modified_on": "2020-06-24T14:34:29.761099Z",
"source": null,
"total_shipping": "12.21",
"delivery_method": {
"id": 1,
"name": "Standard",
"turnaround_time_min_days": 3,
"turnaround_time_max_days": 5,
"turnaround_time": "3-5 business days",
"country": "US"
},
"requested_by": "User",
"shipping_address1": "2607 New York Ave",
"shipping_address2": null,
"shipping_city": "Union City",
"shipping_state": "NJ",
"shipping_zip": "07087",
"shipping_country": "US"
}
}
* The response examples in this guide have been truncated to show less data.
This payload contains information about the shipments. Pay special attention to the status
, status_detail
, status_updated_at
, tracking
, and tracking_url
keys. These keys will contain tracking information updates of the shipments.
Getting the Sizes identification
Each size has its own identifier. You need to use them to represent them on the SwagUp API. To get these identifiers you can make a GET
request to:
https://api.swagup.com/api/v1/sizes/
Example response*:
{
"count": 12,
"next": null,
"previous": null,
"results": [
{
"id": 10,
"name": "XXS",
"category": "Apparel",
"modified_on": "2019-12-11T21:05:24.554555Z",
"sort_order": 1
},
{
"id": 9,
"name": "One Size",
"category": "Generic",
"modified_on": "2019-09-15T17:48:09.873973Z",
"sort_order": 1
},
{
"id": 1,
"name": "XS",
"category": "Apparel",
"modified_on": "2020-12-17T15:13:01.036640Z",
"sort_order": 2
},
{
"id": 2,
"name": "S",
"category": "Apparel",
"modified_on": "2021-07-07T14:31:20.901393Z",
"sort_order": 3
},
{
"id": 3,
"name": "M",
"category": "Apparel",
"modified_on": "2021-07-07T14:32:05.465864Z",
"sort_order": 4
},
{
"id": 4,
"name": "L",
"category": "Apparel",
"modified_on": "2021-07-07T14:30:13.550886Z",
"sort_order": 5
},
{
"id": 5,
"name": "XL",
"category": "Apparel",
"modified_on": "2020-12-17T15:13:27.681610Z",
"sort_order": 6
},
{
"id": 6,
"name": "2XL",
"category": "Apparel",
"modified_on": "2020-07-28T17:16:40.096085Z",
"sort_order": 7
},
{
"id": 7,
"name": "3XL",
"category": "Apparel",
"modified_on": "2020-07-28T17:17:12.210710Z",
"sort_order": 8
},
{
"id": 8,
"name": "4XL",
"category": "Apparel",
"modified_on": "2020-07-28T17:17:33.706330Z",
"sort_order": 9
},
{
"id": 11,
"name": "5XL",
"category": "Apparel",
"modified_on": "2020-07-28T17:17:49.615549Z",
"sort_order": 11
},
{
"id": 12,
"name": "6XL",
"category": "Apparel",
"modified_on": "2020-07-28T17:18:04.441209Z",
"sort_order": 12
}
]
}
* The response examples in this guide have been truncated to show less data.
Hope this information is helpful. For more information go here.