This API endpoint allows you to create a new shipping line.

Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Resource Not Found.
500 Internal Server Error.

Examples

curl "https://app.octopi.co/api/v1/shipping_lines.json" -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE" -d '{"shipping_line" : {"name" : "shipping line name", "code" : "CODE", "email" : "email@gmail.com", "general_ledger_id" : "M001", "address" : "address"}}'
{
   "shipping_line" : {
      "contact_person" : "contact_person",
      "dock_receipt_email" : null,
      "id" : 1271,
      "empty_container_storage_teu_quota" : null,
      "address" : "address",
      "receive_email_alerts_on_container_damages" : false,
      "carrier_type" : "ocean",
      "code" : "CODE",
      "email" : "email@gmail.com",
      "phone" : null,
      "general_ledger_id" : "M001",
      "vat_number" : null,
      "name" : "shipping line name",
      "synonyms" : []
   }
}

Params

Param name Description
shipping_line
required

Validations:

  • Must be a Hash

shipping_line[code]
required

Validations:

  • Must be a String

shipping_line[carrier_type]
optional

Pass carrier type among ocean, rail, air, or truck.

Validations:

  • Must be a String

shipping_line[address]
optional

Validations:

  • Must be a String

shipping_line[parent_id]
optional

If there is a parent shipping line, pass it’s Octopi ID.

Validations:

  • Must be a Integer

shipping_line[email]
optional

Validations:

  • Must be a String

shipping_line[contact_person]
optional

Validations:

  • Must be a String

shipping_line[phone]
optional

Validations:

  • Must be a String

shipping_line[receive_email_alerts_on_container_damages]
optional

Validations:

  • Must be one of: true, false.

shipping_line[vat_number]
optional

Validations:

  • Must be a String

shipping_line[general_ledger_id]
optional

Validations:

  • Must be a String

shipping_line[dock_receipt_email]
optional

Validations:

  • Must be a String

shipping_line[empty_container_storage_teu_quota]
optional

Validations:

  • Must be a Integer

shipping_line[synonyms]
optional

Validations:

  • Must be an array of any type