Using the Carrier resource, you can add a carrier to an order and then get a list of applicable shipping rates at checkout.
/accounts/{accountId}/shops/{shopId}/carriers
Get a list of carriers for your shop.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
page |
query | 0 |
int | zero-based page index | |
size |
query | 10 |
int | number of items per page |
<pagedData>
<records>...</records>
<totalElements>...</totalElements>
</pagedData>
{
"pagedData" : {
"records" : [ { }, { } ],
"totalElements" : 12345
}
}
/accounts/{accountId}/shops/{shopId}/carriers/{carrierId}
Get a single carrier by its id.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
carrierId |
required | path | int | the unique identifier of the carrier |
<carrier>
<id>...</id>
<name>UPS</name>
<description>Standard domestic shipping method</description>
<phoneRequired>true</phoneRequired>
<moduleProvider>
<id>...</id>
<name>Standard</name>
<provider>ups</provider>
<serviceType>standard</serviceType>
<moduleType>
<id>...</id>
<name>SPOD</name>
</moduleType>
</moduleProvider>
<customProvider>...</customProvider>
<premium>...</premium>
<emdorsement>...</emdorsement>
<ddp>...</ddp>
<showTicketLogo>...</showTicketLogo>
<customApiUser>...</customApiUser>
<customApiKey>...</customApiKey>
<htmlTemplate>...</htmlTemplate>
<mainCarrier/>
<perProduct>...</perProduct>
</carrier>
{
"carrier" : {
"id" : 12345,
"name" : "UPS",
"description" : "Standard domestic shipping method",
"phoneRequired" : true,
"moduleProvider" : {
"id" : 12345,
"name" : "Standard",
"provider" : "ups",
"serviceType" : "standard",
"moduleType" : {
"id" : 12345,
"name" : "SPOD"
}
},
"customProvider" : "...",
"premium" : true,
"emdorsement" : "...",
"ddp" : true,
"showTicketLogo" : true,
"customApiUser" : "...",
"customApiKey" : "...",
"htmlTemplate" : "...",
"mainCarrier" : {
"id" : 12345,
"name" : "UPS",
"description" : "Standard domestic shipping method",
"phoneRequired" : true,
"moduleProvider" : {
"id" : 12345,
"name" : "Standard",
"provider" : "ups",
"serviceType" : "standard",
"moduleType" : { }
},
"customProvider" : "...",
"premium" : true,
"emdorsement" : "...",
"ddp" : true,
"showTicketLogo" : true,
"customApiUser" : "...",
"customApiKey" : "...",
"htmlTemplate" : "...",
"mainCarrier" : { },
"perProduct" : true
},
"perProduct" : true
}
}
/accounts/{accountId}/shops/{shopId}/carriers/expanded
Get a list of carriers (expanded) for your shop.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
page |
query | 0 |
int | zero-based page index | |
size |
query | 10 |
int | number of items per page |
<pagedData>
<records>...</records>
<totalElements>...</totalElements>
</pagedData>
{
"pagedData" : {
"records" : [ { }, { } ],
"totalElements" : 12345
}
}
/accounts/{accountId}/shops/{shopId}/carriers/expanded/{carrierId}
Get a single carrier (expanded) by its id.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
carrierId |
required | path | int | the unique identifier of the carrier |
| Media Type | Data Type | Description |
|---|---|---|
application/json |
CarrierExpanded | |
application/xml |
CarrierExpanded |
<carrierExpanded>
<zones>
<carrierZoneExpanded>
<destinations>
<carrierDestination>
<id>...</id>
<country/>
</carrierDestination>
</destinations>
<prices>
<carrierPrice>
<id>...</id>
<price>5.00</price>
<weightLimit>-1</weightLimit>
<country/>
</carrierPrice>
</prices>
<id>...</id>
<name>Western Europe</name>
</carrierZoneExpanded>
</zones>
<localizations>
<carrierLocalized>
<id>...</id>
<name>UPS</name>
<description>...</description>
<language>
<id>...</id>
<code>en</code>
<name>English</name>
</language>
</carrierLocalized>
</localizations>
<id>...</id>
<name>UPS</name>
<description>Standard domestic shipping method</description>
<phoneRequired>true</phoneRequired>
<moduleProvider>
<id>...</id>
<name>Standard</name>
<provider>ups</provider>
<serviceType>standard</serviceType>
<moduleType/>
</moduleProvider>
<customProvider>...</customProvider>
<premium>...</premium>
<emdorsement>...</emdorsement>
<ddp>...</ddp>
<showTicketLogo>...</showTicketLogo>
<customApiUser>...</customApiUser>
<customApiKey>...</customApiKey>
<htmlTemplate>...</htmlTemplate>
<mainCarrier/>
<perProduct>...</perProduct>
</carrierExpanded>
{
"carrierExpanded" : {
"zones" : {
"carrierZoneExpanded" : [ {
"destinations" : {
"carrierDestination" : [ {
"id" : 12345,
"country" : { }
}, {
"id" : 12345,
"country" : { }
} ]
},
"prices" : {
"carrierPrice" : [ {
"id" : 12345,
"price" : 5.0,
"weightLimit" : -1.0,
"country" : { }
}, {
"id" : 12345,
"price" : 5.0,
"weightLimit" : -1.0,
"country" : { }
} ]
},
"id" : 12345,
"name" : "Western Europe"
}, {
"destinations" : {
"carrierDestination" : [ {
"id" : 12345,
"country" : { }
}, {
"id" : 12345,
"country" : { }
} ]
},
"prices" : {
"carrierPrice" : [ {
"id" : 12345,
"price" : 5.0,
"weightLimit" : -1.0,
"country" : { }
}, {
"id" : 12345,
"price" : 5.0,
"weightLimit" : -1.0,
"country" : { }
} ]
},
"id" : 12345,
"name" : "Western Europe"
} ]
},
"localizations" : {
"carrierLocalized" : [ {
"id" : 12345,
"name" : "UPS",
"description" : "...",
"language" : {
"id" : 12345,
"code" : "en",
"name" : "English"
}
}, {
"id" : 12345,
"name" : "UPS",
"description" : "...",
"language" : {
"id" : 12345,
"code" : "en",
"name" : "English"
}
} ]
},
"id" : 12345,
"name" : "UPS",
"description" : "Standard domestic shipping method",
"phoneRequired" : true,
"moduleProvider" : {
"id" : 12345,
"name" : "Standard",
"provider" : "ups",
"serviceType" : "standard",
"moduleType" : {
"id" : 12345,
"name" : "SPOD"
}
},
"customProvider" : "...",
"premium" : true,
"emdorsement" : "...",
"ddp" : true,
"showTicketLogo" : true,
"customApiUser" : "...",
"customApiKey" : "...",
"htmlTemplate" : "...",
"mainCarrier" : {
"id" : 12345,
"name" : "UPS",
"description" : "Standard domestic shipping method",
"phoneRequired" : true,
"moduleProvider" : {
"id" : 12345,
"name" : "Standard",
"provider" : "ups",
"serviceType" : "standard",
"moduleType" : { }
},
"customProvider" : "...",
"premium" : true,
"emdorsement" : "...",
"ddp" : true,
"showTicketLogo" : true,
"customApiUser" : "...",
"customApiKey" : "...",
"htmlTemplate" : "...",
"mainCarrier" : { },
"perProduct" : true
},
"perProduct" : true
}
}