Get shipping methods grouped by carrier
In the Tango API, a shipping method is the carrier service level used to deliver a physical order. The shippingMethod field specifies how a physical reward should be shipped to the recipient and tells Tango which delivery option to use (for example, Ground shipping, Next Day, or other supported carrier/service levels).
Each method includes a display label and an enumeration value. Show the label in your application and submit the corresponding enumeration value in the asynchronous line item’s shippingMethod field.
Endpoint
Use GET {URI}/shippingMethods to retrieve the methods available to your platform. Then display the appropriate label in your order flow and submit the corresponding enumeration when creating a physical delivery order:
| Endpoint | Purpose |
|---|---|
GET {URI}/shippingMethods | Get all available shipping methods grouped by carrier. |
Note:
shippingMethodis required for physical delivery line items.- Include
shippingMethodwhendeliveryMethodisADDRESSorBULKSHIPMENT. Use a supported string enumeration returned byGET {URI}/shippingMethods.- Do not include
shippingMethodfor digital delivery methods, such asBULKDIGITAL.
Use case
Acme Health sends physical gift cards to employees who complete a wellness program. Before submitting an asynchronous order, Acme calls GET {URI}/shippingMethods to retrieve shipping methods grouped by carrier. Its application displays the returned service labels so an administrator can select an appropriate option.
If the selected method’s label is UPS Ground and its enumeration is upsground, Acme includes "shippingMethod": "upsground" in the physical reward line item.
Here is the workflow:
- Retrieve shipping methods.
- Display the returned labels and descriptions.
- Select an appropriate method for the physical shipment.
- Submit its enumeration value in the asynchronous line item’s
shippingMethodfield.
Example
The following example shows the response structure for GET {URI}/shippingMethods. The carriers array groups shipping methods by carrier. Each method includes a display label, an enumeration value to send as shippingMethod when creating an order, and a description with additional service details. The "string" values are placeholders.
{
"carriers": [
{
"carrier": "UPS",
"shippingMethods": [
{
"label": "UPS Ground",
"enumeration": "upsground",
"description": "Delivery 3-5 business days after processing"
}
]
}
]
}Response fields
Use the following table to interpret the response from GET {URI}/shippingMethods. Display each method’s label to users and send its enumeration value in the line item’s shippingMethod field. The [] notation represents an item in an array.
For example, if a method has the label UPS Ground and enumeration upsground, display UPS Ground in your application and include "shippingMethod": "upsground" in the asynchronous order’s line item.
| Response field | Data type | Description |
|---|---|---|
carriers | array of objects | Carriers and their shipping methods. |
carriers[].carrier | string | The shipping provider, such as UPS or USPS. |
carriers[].shippingMethods | array of objects | Shipping services listed under the carrier. |
carriers[].shippingMethods[].label | string | Service name to display to users. |
carriers[].shippingMethods[].enumeration | string | Value to send in the line item’s shippingMethod field. |
carriers[].shippingMethods[].description | string | Additional details about the shipping service. |
Sample shipping costs
Use the following sample costs to compare shipping options for physical rewards. Individual pricing applies only when the quantity is 1 and the shipping method is USPS First Class. The table includes bulk-pricing examples and a free individual USPS First Class option. “Not provided” means sample pricing or eligibility details are not listed.
| Carrier | Shipping methods | Quantity Range | Shipping fee (USD) | Shipping type | Region |
|---|---|---|---|---|---|
| UPS | Ground | 1-10 | $17.50 | Bulk | USA |
| UPS | Ground | 11-30 | $18.75 | Bulk | USA |
| UPS | Ground | 31-100 | $20.00 | Bulk | USA |
| UPS | Ground | 101-250 | $21.25 | Bulk | USA |
| UPS | Ground Signature | 1-10 | $23.45 | Bulk | USA |
| UPS | Second Day | 1-10 | $27.50 | Bulk | USA |
| UPS | Second Day Signature | 1-10 | $33.45 | Bulk | USA |
| UPS | Next Day | 1-10 | $30.25 | Bulk | USA |
| UPS | Next Day | 101-250 | $48.00 | Bulk | USA |
| UPS | Next Day | 251-500 | $99.01 | Bulk | USA |
| UPS | Next Day Signature | 1-10 | $36.20 | Bulk | USA |
| USPS | Priority Mail Flat | 1-10 | $10.00 | Bulk | USA |
| USPS | Priority Mail Flat | 11-30 | $11.00 | Bulk | USA |
| USPS | Priority Mail Flat | 31-100 | $22.00 | Bulk | USA |
| USPS | Priority Mail Flat | 101–250 | $26.00 | Bulk | USA |
| USPS | Priority Mail Flat | 251-500 | $40.00 | Bulk | USA |
| USPS | Priority Mail Flat with Signature | 1-10 | $13.50 | Bulk | USA |
| USPS | Priority Mail Flat with Signature | 101-250 | $29.50 | Bulk | USA |
| USPS | First Class | 1 | $0.00 | Individual | USA |
Sample shipping-cost lookup
Select a carrier, shipping method, and reward quantity to look up a sample fee. The lookup includes the listed bulk rates and individual USPS First Class rate. It does not call the API or confirm shipping eligibility.
Response codes
The possible response codes for this endpoint are as follows. For details, see i18nkey codes and their error messages:
| Response code | Meaning |
|---|---|
| 200 | The request was successful. |
| 400 | The server could not understand the request due to invalid syntax. |
| 401 | Authentication is required and has either not been provided or failed. |
| 403 | The server understood the request but refuses to authorize it. |
| 500 | Something went wrong on the server, but the server cannot be more specific about what the exact problem is. |
| 503 | The server is currently unable to handle the request due to temporary overload or maintenance. |
Updated 1 day ago
