Methods API
API for Methods and their association to Providers, Locales, and Services
Return Methods
GET
/method?provider=
{provider_moniker_csv}
&retailer={retailer_moniker_csv}
GET
/method/
{method_id}
/provider
POST
/method
PUT
/method/
{method_id}
GET
/method/
{method_id}
GET
/method?provider=
{provider_moniker_csv}
&retailer={retailer_moniker_csv}
Search for a method by retailers that use it or providers that support it
Path variables
provider_moniker_csv
string
required
retailer_moniker_csv
string
required
Responses
200
OK
Body
Array
Object
id
string
Example:
mail
name
string
Example:
By Mail
benefits
Array
Example:
["Freight Consolidation"]
string
Example:
Freight Consolidation
category
string
Example:
dropoff
NeedsShippingLabel
boolean
Example:
true
NeedsPackingSlip
boolean
Example:
true
NeedsShipment
boolean
Example:
true
NeedsQrCode
boolean
Example:
true
NeedsLocation
boolean
Example:
true
NeedsAppointment
boolean
Example:
true
NeedsBox
boolean
Example:
true
RefundSpeed
string
Example:
fast
ServiceFees
Array
Object
Reason
string
Example:
Box
Value
number
Example:
1.5
Examples
[
{
"id": "mail",
"name": "By Mail",
"benefits": [
"Freight Consolidation"
],
"category": "dropoff",
"NeedsShippingLabel": true,
"NeedsPackingSlip": true,
"NeedsShipment": true,
"NeedsQrCode": true,
"NeedsLocation": true,
"NeedsAppointment": true,
"NeedsBox": true,
"RefundSpeed": "fast",
"ServiceFees": [
{
"Reason": "Box",
"Value": 1.5
}
]
}
]
POST
/method
Create a new method definition
Request body
Object
id
string
Example:
mail
name
string
Example:
By Mail
benefits
Array
string
Examples:
Packing MaterialsFreight Consolidation
category
string
Example:
dropoff
NeedsShippingLabel
boolean
NeedsPackingSlip
boolean
NeedsShipment
boolean
NeedsQrCode
boolean
NeedsLocation
boolean
NeedsAppointment
boolean
NeedsBox
boolean
RefundSpeed
One of
string
Examples:
slowmediumfast
ServiceFees
Array
Object
Reason
string
Example:
Box
Value
number
Example:
1.5
Examples
{
"id": "mail",
"name": "By Mail",
"benefits": [
"Packing Materials"
],
"category": "dropoff",
"NeedsShippingLabel": true,
"NeedsPackingSlip": true,
"NeedsShipment": true,
"NeedsQrCode": true,
"NeedsLocation": true,
"NeedsAppointment": true,
"NeedsBox": true,
"RefundSpeed": "fast",
"ServiceFees": [
{
"Reason": "Box",
"Value": 1.5
}
]
}
Responses
201
Created
400
Bad Request
PUT
/method/
{method_id}
Change a method definition
Path variables
method_id
string
required
Request body
Object
name
string
Example:
mail
benefits
Array
Example:
["Freight Consolidation"]
string
Example:
Freight Consolidation
category
string
Example:
dropoff
NeedsShippingLabel
boolean
Example:
true
NeedsPackingSlip
boolean
Example:
true
NeedsShipment
boolean
Example:
true
NeedsQrCode
boolean
Example:
true
NeedsLocation
boolean
Example:
true
NeedsAppointment
boolean
Example:
true
NeedsBox
boolean
Example:
true
RefundSpeed
string
Example:
fast
ServiceFees
Array
Object
Reason
string
Example:
Box
Value
number
Example:
1.5
Responses
204
No Content
400
Bad Request
Triggers supported by a Method
GET
/method/
{method_id}
/trigger
POST
/method/
{method_id}
/trigger
DELETE
/method/
{method_id}
/trigger/{trigger_id}
GET
/method/
{method_id}
/triggerReturns all triggers supported by the given method
Path variables
method_id
string
required
Responses
200
OK
Body
Array
Object
trigger_id
string
Example:
carrier_scan
triggers_fast_refund
boolean
Example:
true
Examples
[
{
"trigger_id": "carrier_scan",
"triggers_fast_refund": true
}
]
404
Not Found
Methods that a Retailer uses
GET
/retailer/
{retailer_moniker}
/method
GET
/retailer/
{retailer_moniker}
/method/{method_id}
POST
/retailer/
{retailer_moniker}
/method
POST
/retailer/
{retailer_moniker}
/method/{method_id}
GET
/retailer/
{retailer_moniker}
/methodDisplay the methods a retailer uses
Path variables
retailer_moniker
string
required
Responses
200
OK
Body
Array
Object
method_id
string
Example:
mail
enabled
boolean
Example:
true
disable_email
string
Example:
false
is_default
string
Example:
false
triggers
Array
Example:
["dropoff"]
string
Example:
dropoff
carriers
Array
Example:
["UPS"]
string
Example:
UPS
Examples
[
{
"method_id": "mail",
"enabled": true,
"disable_email": "false",
"is_default": "false",
"triggers": [
"dropoff"
],
"carriers": [
"UPS"
]
}
]
GET
/retailer/
{retailer_moniker}
/method/{method_id}
Get the details of a specific method supported by a retailer
Path variables
retailer_moniker
string
required
method_id
string
required
Responses
200
OK
Body
Object
method_id
string
Example:
mail
enabled
boolean
Example:
true
disable_email
string
Example:
false
is_default
string
Example:
false
triggers
Array
Example:
["dropoff"]
string
Example:
dropoff
carriers
Array
Example:
["UPS"]
string
Example:
UPS
Examples
{
"method_id": "mail",
"enabled": true,
"disable_email": "false",
"is_default": "false",
"triggers": [
"dropoff"
],
"carriers": [
"UPS"
]
}
POST
/retailer/
{retailer_moniker}
/methodAdd a method to those used by the retailer
Path variables
retailer_moniker
string
required
Request body
Object
method_id
string
Example:
mail
enabled
boolean
Example:
true
disable_email
boolean
Example:
false
is_default
boolean
Example:
false
triggers
Array
of
string
Example:
[
"dropoff", "carrier_scan"
]
carriers
Array
of
string
Example:
[
"UPS", "USPS"
]
Examples
{
"method_id": "mail",
"enabled": true,
"disable_email": "false",
"is_default": "false",
"triggers": [
""
],
"carriers": [
""
]
}
Responses
201
Created
400
Bad Request
POST
/retailer/
{retailer_moniker}
/method/{method_id}
Update the properties of a method used by a retailer
Path variables
retailer_moniker
string
required
method_id
string
required
Request body
Object
enabled
boolean
Example:
true
disable_email
boolean
Example:
false
is_default
boolean
Example:
true
triggers
Array
of
string
Example:
[
"dropoff", "carrier_scan"
]
carriers
Array
of
string
Example:
[
"UPS", "USPS"
]
Responses
204
No Content
404
Not Found
400
Bad Request
Custom rules defined by the Retailer that change the properties of a Method
GET
/retailer/
{retailer_moniker}
/method/{method_id}
/rule
GET
/retailer/
{retailer_moniker}
/method/{method_id}
/rule/{rule_id}
POST
/retailer/
{retailer_moniker}
/method/{method_id}
/rule
PUT
/retailer/
{retailer_moniker}
/method/{method_id}
/rule/{rule_id}
DELETE
/retailer/
{retailer_moniker}
/method/{method_id}
/rule/{rule_id}
GET
/retailer/
{retailer_moniker}
/method/{method_id}
/ruleDisplay custom rules for this retailer for a method
Path variables
retailer_moniker
string
required
method_id
string
required
Responses
200
OK
Body
Array
Object
rule_id
string
rule_text
string
rule_info
string
Example:
{ "max_return_days": null, "return_methods": [ "mail", "store.return", "printerless_mail" ], "rules_info_model_json": "[]", "edd_rules": null, "rules": null }
version
integer
Example:
1
GET
/retailer/
{retailer_moniker}
/method/{method_id}
/rule/{rule_id}
Path variables
retailer_moniker
string
required
method_id
string
required
rule_id
string
required
Responses
200
OK
Body
Object
rule_id
string
rule_text
string
rule_info
string
Example:
{ "max_return_days": null, "return_methods": [ "mail", "store.return", "printerless_mail" ], "rules_info_model_json": "[]", "edd_rules": null, "rules": null }
version
integer
Example:
1
404
Not Found
POST
/retailer/
{retailer_moniker}
/method/{method_id}
/rulePath variables
retailer_moniker
string
required
method_id
string
required
Request body
Object
rule_id
string
rule_text
string
rule_info
string
Example:
{ "max_return_days": null, "return_methods": [ "mail", "store.return", "printerless_mail" ], "rules_info_model_json": "[]", "edd_rules": null, "rules": null }
version
integer
Example:
1
Examples
{
"rule_id": "",
"rule_text": "",
"rule_info": "{ \"max_return_days\": null, \"return_methods\": [ \"mail\", \"store.return\", \"printerless_mail\" ], \"rules_info_model_json\": \"[]\", \"edd_rules\": null, \"rules\": null }",
"version": 1
}
Responses
201
Created
400
Bad Request
PUT
/retailer/
{retailer_moniker}
/method/{method_id}
/rule/{rule_id}
Path variables
retailer_moniker
string
required
method_id
string
required
rule_id
string
required
Request body
Object
rule_text
string
rule_info
string
version
integer
Example:
2
Responses
204
No Content
404
Not Found
400
Bad Request
GET
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/webhook/{webhook_id}
PUT
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/webhook
DELETE
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/webhook/{webhook_id}
GET
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/webhook/{webhook_id}
Path variables
retailer_moniker
string
required
method_id
string
required
trigger_id
string
required
webhook_id
string
required
Responses
200
OK
Body
Object
url
string
Example:
https://webhook.receiver.com/narvar
api_key
string
Example:
dojodfsd8du3e37udsudsuh=
404
Not Found
PUT
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/webhookPath variables
retailer_moniker
string
required
method_id
string
required
trigger_id
string
required
Request body
Object
url
string
Example:
https://webhook.receiver.com/narvar
api_key
string
Example:
dojodfsd8du3e37udsudsuh=
Examples
{
"url": "https://webhook.receiver.com/narvar",
"api_key": "dojodfsd8du3e37udsudsuh="
}
Responses
201
Created
400
Bad Request
DELETE
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/webhook/{webhook_id}
Path variables
retailer_moniker
string
required
method_id
string
required
trigger_id
string
required
webhook_id
string
required
Responses
204
No Content
404
Not Found
GET
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/email/{email_id}
POST
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/email
DELETE
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/email/{email_id}
GET
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/email/{email_id}
Path variables
retailer_moniker
string
required
method_id
string
required
trigger_id
string
required
email_id
string
required
Responses
200
OK
Body
Object
template
string
Example:
lorem ipsum lorem ipsum {lorem}
data
string
Example:
[{"key": "value"}]
404
Not Found
POST
/retailer/
{retailer_moniker}
/method/{method_id}
/trigger/{trigger_id}
/emailPath variables
retailer_moniker
string
required
method_id
string
required
trigger_id
string
required
Request body
Object
template
string
Example:
lorem ipsum lorem ipsum {lorem}
data
string
Example:
[{"key": "value"}]
Examples
{
"template": "lorem ipsum lorem ipsum {lorem}",
"data": "[{\"key\": \"value\"}]"
}
Responses
201
Created
400
Bad Request
GET
/retailer/
{retailer_id}
/method/{method_id}
/uioptions/{locale_id}
PUT
/retailer/
{retailer_id}
/method/{method_id}
/uioptions/{locale_id}
GET
/retailer/
{retailer_id}
/method/{method_id}
/uioptions/{locale_id}
Path variables
retailer_id
string
required
method_id
string
required
locale_id
string
required
Responses
200
OK
Body
Object
description
string
Example:
Let us pick it up
benefit_1
string
Example:
Saves the environment!
benefit_2
string
Example:
Makes you feel good!
link_text
string
Example:
Schedule Now
link_url
string
Example:
http://www.ups.com/pickup
404
Not Found
PUT
/retailer/
{retailer_id}
/method/{method_id}
/uioptions/{locale_id}
Path variables
retailer_id
string
required
method_id
string
required
locale_id
string
required
Request body
Object
description
string
Example:
Let us pick it up
benefit_1
string
Example:
Saves the environment!
benefit_2
string
Example:
Makes you feel good!
link_text
string
Example:
Schedule Now
link_url
string
Example:
http://www.ups.com/pickup
Examples
{
"description": "Let us pick it up",
"benefit_1": "Saves the environment!",
"benefit_2": "Makes you feel good!",
"link_text": "Schedule Now",
"link_url": "http://www.ups.com/pickup"
}
Responses
200
OK
400
Bad Request
GET
/retailer/
{retailer_moniker}
/provider
GET
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
PUT
/retailer/
{retailer_moniker}
/provider
DELETE
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
GET
/retailer/
{retailer_moniker}
/providerPath variables
retailer_moniker
string
required
Responses
200
OK
Body
Array
Object
retailer_moniker
string
Example:
XYZ
provider_moniker
string
Example:
ABC
is_preferred
boolean
Example:
true
services
Array
Example:
["ground"]
string
Example:
ground
GET
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
Path variables
retailer_moniker
string
required
provider_moniker
string
required
Responses
200
OK
Body
Object
Example:
{
"retailer_moniker": "XYZ",
"provider_moniker": "ABC",
"is_preferred": true,
"services": [
"ground"
]
}
retailer_moniker
string
Example:
XYZ
provider_moniker
string
Example:
ABC
is_preferred
boolean
Example:
true
services
Array
Example:
["ground","next-day","same-day"]
string
Example:
ground
404
Not Found
PUT
/retailer/
{retailer_moniker}
/providerPath variables
retailer_moniker
string
required
Request body
Object
provider_moniker
string
Example:
ABC
is_preferred
boolean
Example:
true
services
Array
Example:
["ground"]
string
Example:
ground
Examples
{
"provider_moniker": "ABC",
"is_preferred": true,
"services": [
"ground"
]
}
Responses
201
Created
400
Bad Request
GET
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
/service
GET
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
/service/{service_id}
PUT
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
/service/{service_id}
GET
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
/service/{service_id}
GET
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
/servicePath variables
retailer_moniker
string
required
provider_moniker
string
required
Responses
200
OK
Body
Array
Object
url
string
Example:
https://www.ups.com/ground-label
api_key
string
Example:
dojodfsd8du3e37udsudsuh=
GET
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
/service/{service_id}
Path variables
retailer_moniker
string
required
provider_moniker
string
required
service_id
string
required
Responses
200
OK
Body
Object
url
string
Example:
https://www.ups.com/ground-label
api_key
string
Example:
dojodfsd8du3e37udsudsuh=
404
Not Found
PUT
/retailer/
{retailer_moniker}
/provider/{provider_moniker}
/service/{service_id}
Path variables
retailer_moniker
string
required
provider_moniker
string
required
service_id
string
required
Request body
Object
url
string
Example:
https://www.ups.com/ground-label
api_key
string
Example:
dojodfsd8du3e37udsudsuh=
Examples
{
"url": "https://www.ups.com/ground-label",
"api_key": "dojodfsd8du3e37udsudsuh="
}
Responses
200
OK
400
Bad Request
GET
/provider/
{provider_moniker}
/method
GET
/provider/
{provider_moniker}
/method/{method_id}
Custom rules defined by the Provider that change the properties of a Method
GET
/provider/
{provider_moniker}
/method/{method_id}
/rule
GET
/provider/
{provider_moniker}
/method/{method_id}
/rule/{rule_id}
POST
/provider/
{provider_moniker}
/method/{method_id}
/rule
PUT
/provider/
{provider_moniker}
/method/{method_id}
/rule/{rule_id}
DELETE
/provider/
{provider_moniker}
/method/{method_id}
/rule/{rule_id}
POST
/provider/
{provider_moniker}
/method/{method_id}
/rulePath variables
provider_moniker
string
required
method_id
string
required
Request body
Object
rule_id
string
rule_text
string
rule_info
string
Example:
{ "max_return_days": null, "return_methods": [ "mail", "store.return", "printerless_mail" ], "rules_info_model_json": "[]", "edd_rules": null, "rules": null }
version
integer
Example:
1
Examples
{
"rule_id": "",
"rule_text": "",
"rule_info": "{ \"max_return_days\": null, \"return_methods\": [ \"mail\", \"store.return\", \"printerless_mail\" ], \"rules_info_model_json\": \"[]\", \"edd_rules\": null, \"rules\": null }",
"version": 1
}
Responses
201
Created
400
Bad Request
PUT
/provider/
{provider_moniker}
/method/{method_id}
/rule/{rule_id}
Path variables
provider_moniker
string
required
method_id
string
required
rule_id
string
required
Request body
Object
rule_text
string
rule_info
string
Example:
{ "max_return_days": null, "return_methods": [ "mail", "store.return", "printerless_mail" ], "rules_info_model_json": "[]", "edd_rules": null, "rules": null }
version
integer
Example:
1
Examples
{
"rule_id": "",
"rule_text": "",
"rule_info": "{ \"max_return_days\": null, \"return_methods\": [ \"mail\", \"store.return\", \"printerless_mail\" ], \"rules_info_model_json\": \"[]\", \"edd_rules\": null, \"rules\": null }",
"version": 1
}
Responses
204
No Content
400
Bad Request