Methods API

API for Methods and their association to Providers, Locales, and Services
Method

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
            }
        ]
    }
]
method-provider-list
GET /method/{method_id}/provider

List the providers that support a method

Path variables

method_id
string required

Responses

200 OK
Body
Array of string
Examples
[
    "UPS", "Fedex", "USPS"
]
404 Not Found
method-add
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
method-update
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
method-delete
GET /method/{method_id}

Remove a method definition

Path variables

method_id
string required

Responses

204 No Content
404 Not Found
Method Trigger

Triggers supported by a Method

GET /method/{method_id}/trigger
POST /method/{method_id}/trigger
DELETE /method/{method_id}/trigger/{trigger_id}
method-trigger-list
GET /method/{method_id}/trigger

Returns 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
method-trigger-add
POST /method/{method_id}/trigger

Adds support for a trigger to a method

Path variables

method_id
string required

Request body

Object
trigger_id
string
Examples:
carrier_scandropoff
triggers_fast_refund
boolean
Example:
true

Responses

201 Created
400 Bad Request
method-trigger-delete
DELETE /method/{method_id}/trigger/{trigger_id}

Remove support for a trigger from a method

Path variables

method_id
string required
trigger_id
string required

Responses

204 No Content
404 Not Found
Retailer Method

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}
retailer-method-list
GET /retailer/{retailer_moniker}/method

Display 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"
        ]
    }
]
reatiler-method-query
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"
    ]
}
retailer-method-add
POST /retailer/{retailer_moniker}/method

Add 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
retailer-method-update
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
Retailer Method Rule

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}
retailer-method-rule-list
GET /retailer/{retailer_moniker}/method/{method_id}/rule

Display 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
retailer-method-rule-query
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
retailer-method-rule-add
POST /retailer/{retailer_moniker}/method/{method_id}/rule

Path 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
retailer-method-rule-update
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
retailer-method-rule-delete
DELETE /retailer/{retailer_moniker}/method/{method_id}/rule/{rule_id}

Path variables

retailer_moniker
string required
method_id
string required
rule_id
string required

Responses

204 No Content
404 Not Found
Retailer Method Trigger Webhook
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}
retailer-method-trigger-webhook-query
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
retailer-method-trigger-webhook-add
PUT /retailer/{retailer_moniker}/method/{method_id}/trigger/{trigger_id}/webhook

Path 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
retailer-method-trigger-webhook-delete
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
Retailer Method Trigger Email Template
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}
retailer-method-trigger-email-query
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
retailer-method-trigger-email-add
POST /retailer/{retailer_moniker}/method/{method_id}/trigger/{trigger_id}/email

Path 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
retailer-method-trigger-email-delete
DELETE /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

204 No Content
404 Not Found
Retailer Method UI Options
GET /retailer/{retailer_id}/method/{method_id}/uioptions/{locale_id}
PUT /retailer/{retailer_id}/method/{method_id}/uioptions/{locale_id}
retailer-method-ui-query
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
retailer-method-ui-upsert
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
Retailer Provider
GET /retailer/{retailer_moniker}/provider
GET /retailer/{retailer_moniker}/provider/{provider_moniker}
PUT /retailer/{retailer_moniker}/provider
DELETE /retailer/{retailer_moniker}/provider/{provider_moniker}
retailer-provider-list
GET /retailer/{retailer_moniker}/provider

Path 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
retailer-provider-query
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
retailer-provider-add
PUT /retailer/{retailer_moniker}/provider

Path 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
retailer-provider-delete
DELETE /retailer/{retailer_moniker}/provider/{provider_moniker}

Path variables

retailer_moniker
string required
provider_moniker
string required

Responses

204 No Content
404 Not Found
Retailer Provider Service Config
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}
retailer-provider-service-list
GET /retailer/{retailer_moniker}/provider/{provider_moniker}/service

Path 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=
retailer-provider-service-query
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
retailer-provider-service-upsert
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
retailer-provider-service-delete
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

204 No Content
404 Not Found
Provider Method
GET /provider/{provider_moniker}/method
GET /provider/{provider_moniker}/method/{method_id}
provider-method-list
GET /provider/{provider_moniker}/method

Path variables

provider_moniker
string required

Responses

200 OK
404 Not Found
provider-method-query
GET /provider/{provider_moniker}/method/{method_id}

Path variables

provider_moniker
string required
method_id
string required

Responses

200 OK
404 Not Found
Provider Method Rule

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}
provider-method-rule-list
GET /provider/{provider_moniker}/method/{method_id}/rule

Path variables

provider_moniker
string required
method_id
string required
provider-method-rule-query
GET /provider/{provider_moniker}/method/{method_id}/rule/{rule_id}

Path variables

provider_moniker
string required
method_id
string required
rule_id
string required
provider-method-rule-add
POST /provider/{provider_moniker}/method/{method_id}/rule

Path 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
provider-method-rule-update
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
provider-method-rule-delete
DELETE /provider/{provider_moniker}/method/{method_id}/rule/{rule_id}

Path variables

provider_moniker
string required
method_id
string required
rule_id
string required

Responses

204 No Content
404 Not Found