POST api/v1/rmas

Submit a ReturnTrak type RMA.

Request Information

URI Parameters

None.

Body Parameters

rma
NameDescriptionTypeAdditional information
rma_number

Only letters, digits or '-' sign are allowed. It could be auto-generated, depends on the account settings.

string

Max length: 25

rma_date

RMA date. Date in ISO-8601 format. Only date part (no time).

date

None.

original_order_number

Only letters, digits or '-' sign are allowed.

string

Max length: 25

shipping_carrier

Shipping carrier name (example: 'UPS').

string

Max length: 30

shipping_service

Shipping service name (example: 'GROUND').

string

Max length: 30

customer_number

You can store your customer id for reference. Also, highly recommended for B2B account.

string

Max length: 25

comments

It will appear on the packing list.

string

Max length: 255

shipping_instructions

RMA comments.

string

Max length: 255

shipping_address

Shipping address.

address

Required

order_amount

decimal number

None.

shipping_handling

decimal number

None.

sales_tax

decimal number

None.

restocking_fee

decimal number

None.

total_amount

decimal number

None.

rma_type

Type of ReturnTrak RMA to submit.

rma_type

Required

disposition

RMA disposition.

disposition

Required

custom_option1

Must match with the input data defined in ReturnTrak. Required only if is required in ReturnTrak.

string

None.

custom_option2

Must match with the input data defined in ReturnTrak. Required only if is required in ReturnTrak.

string

None.

custom_option3

Must match with the input data defined in ReturnTrak. Required only if is required in ReturnTrak.

string

None.

custom_option4

Must match with the input data defined in ReturnTrak. Required only if is required in ReturnTrak.

string

None.

custom_option5

Must match with the input data defined in ReturnTrak. Required only if is required in ReturnTrak.

string

None.

custom_option6

Must match with the input data defined in ReturnTrak. Required only if is required in ReturnTrak.

string

None.

custom_option7

Must match with the input data defined in ReturnTrak. Required only if is required in ReturnTrak.

string

None.

generate_return_service_label

Generate a return service label.

boolean

Default value is false

return_weight_lb

Weight, in pounds, of the returned items (required if a return service label is needed).

decimal number

None.

rma_location

If not empty, specify the RMA location instead of the pre-defined value.

string

None.

rma_account_number

If not empty, specify the RMA account number instead of the pre-defined value.

string

None.

shipping_location

If not empty, specify the shipping location instead of the pre-defined value.

string

None.

shipping_account_number

If not empty, specify the shipping account number instead of the pre-defined value.

string

None.

lines

Collection of line

Required

Request Formats

application/json, text/json

Sample:
{
  "rma_number": "RMADEM001",
  "rma_date": "2015-01-12",
  "original_order_number": "",
  "shipping_carrier": "UPS",
  "shipping_service": "GROUND",
  "customer_number": "",
  "comments": "",
  "shipping_instructions": "",
  "shipping_address": {
    "company": "DCL Corp",
    "attention": "Walter P",
    "address1": "48641 Milmont dr",
    "address2": "",
    "email": "",
    "phone": "",
    "city": "Fremont",
    "state_province": "CA",
    "postal_code": "94538",
    "country_code": "US"
  },
  "order_amount": 0.00,
  "shipping_handling": 0.00,
  "sales_tax": 0.00,
  "restocking_fee": 0.00,
  "total_amount": 0.00,
  "rma_type": 1,
  "disposition": 1,
  "custom_option1": "Best Buy",
  "generate_return_service_label": false,
  "return_weight_lb": 0,
  "lines": [
    {
      "item_number": "1001-001-DEMO",
      "description": "Demo product",
      "quantity": 1,
      "price": 10.00
    },
    {
      "item_number": "1002-002-DEMO2",
      "description": "Demo product 2",
      "quantity": 1,
      "price": 5.0,
      "serial_number": "ABC123",
      "ship_item_number": "1003-003-DEMO3",
      "ship_description": "Demo product 3",
      "ship_quantity": 1,
      "ship_price": 5.0
    }
  ]
}

Response Information

Resource Description

response_post_rmas
NameDescriptionTypeAdditional information
error_code

Zero if no errors. When different from zero, the rma is rejected. See 'error_message' for a detailed description of the error.

integer

None.

error_message

Returns a detailed description of the error.

string

None.

rma_number

RMA number generated.

string

None.

return_label_url

Return label URL.

string

None.

return_label_tracking_number

Return label tracking number.

string

None.

Response Formats

application/json, text/json

Sample:
{
  "error_code": 0,
  "error_message": "",
  "rma_number": "RMADEM001",
  "return_label_url": "",  
  "return_label_tracking_number": ""
}