Transport Agreements

A transport agreement represents an agreement between you and a carrier to transport your goods. To create a consignment you must supply the ID of a valid transport agreement for the carrier and product you want to use.

  • Requires authentication: Yes
  • Requires sender ID: Yes

Usage

Getting a list of transport agreements
cURL
curl -g -XGET -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' 'https://cargonizer.no/transport_agreements.xml'
HTTP
GET /transport_agreements.xml HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678
Pseudocode
http = new HTTPRequest(); http.method = 'GET'; http.url = 'https://cargonizer.no/transport_agreements.xml'; http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); response = http.execute();

XML Response

<transport_agreements> The list of transport agreements that you have access to
  <transport_agreement>  
    <description> A description of the agreement.
    <id> The unique ID of a single agreement.
    <number> The agreement/customer number between a consignor and the carrier.
    <carrier> The carrier with whom this agreement is made
      <identifier> Carrier identifier
      <name> Carrier name
    <products> A list of possible transport products for this agreement.
      <product>  
        <identifier> Product identifier
        <name> Product name
        <min_items> The minimum number of items required for this product. No restriction if not present.
        <max_items> The maximum number of items supported by this product. No restriction if not present.
        <min_weight> The minimum weight required for this product. No restriction if not present.
        <max_weight> The maximum weight supported by this product. No restriction if not present.
        <services> List of available services for this product
          <service>  
            <identifier> Service identifier
            <name> Service name
              <attributes> List of attributes for this service
                <attribute>  
                  <identifier> Attribute identifier
                  <name> Attribute name
                  <type> Attribute type (string, integer, float, boolean)
                  <required> Whether this attribute is required or not (true, false)
                  <min> Minimum length for this attribute, if any. Length is defined as an amount for integer and float types and number of characters for string types
                  <max> Maximum length for this attribute, if any.
                    <values> A list of acceptable values for this attribute. If not present, any value is accepted.
                      <value> A single accepted value.

XML Response with Example Values

<?xml version="1.0" encoding="UTF-8"?>
<transport-agreements type="array">
  <transport-agreement>
    <id type="integer">1</id>
    <description>Standard</description>
    <number>12345</number>
    <carrier>
      <identifier>bring</identifier>
      <name>Bring</name>
    </carrier>
    <products type="array">
      <product>
        <identifier>bring_bedriftspakke</identifier>
        <name>Bedriftspakke</name>
        <services type="array">
          <service>
            <identifier>bring_oppkrav</identifier>
            <name>Postoppkrav</name>
            <attributes type="array">
              <attribute>
                <identifier>amount</identifier>
                <type>float</type>
                <required>true</required><!-- "true" or "false" -->
                <min>50</min><!-- Minimum value for this attribute -->
                <max>5000</max> <!-- Maximum value for this attribute -->
              </attribute>
              <attribute>
                <identifier>currency</identifier>
                <type>string</type>
                <required>true</required>
                <!-- Allowed values for this attribute -->
                <values type="array">
                  <value description="Norway NOK">nok</value>
                  <value description="Sweden SEK">sek</value>
                  <value description="Denmark DKK">dkk</value>
                </values>
              </attribute>
              <attribute>
                <!-- ... -->
              </attribute>
            </attributes>
          </service>
        </services>
      </product>
      <product>
        <identifier>tg_dpd_utland</identifier>
        <name>DPD - Eksport</name>
        <services type="array">
          <service>
            <identifier>tg_insurance</identifier>
            <name>Forsikring</name>
          </service>
          <service>
           <!-- ... -->
           </service>
        </services>
      </product>
      <product>
        <!-- ... -->
      </product>
    </products>
  </transport-agreement>
  <transport-agreement>
    <!-- ... -->
  </transport-agreement>
</transport-agreements>

Filtering transport agreements by carrier or product

You can filter the returned list of transport agreements by supplying a carrier or product identifier.

Returning only transport agreements with the carrier Bring
cURL
curl -g -XGET -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' 'https://cargonizer.no/transport_agreements.xml?carrier_id=bring'
HTTP
GET /transport_agreements.xml?carrier_id=bring HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678
Pseudocode
http = new HTTPRequest(); http.method = 'GET'; http.url = 'https://cargonizer.no/transport_agreements.xml?carrier_id=bring'; http.queryStringParameters.set('carrier_id', 'bring'); http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); response = http.execute();
Returning only transport agreements with the product Bring Servicepakke
cURL
curl -g -XGET -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' 'https://cargonizer.no/transport_agreements.xml?product_id=bring_servicepakke'
HTTP
GET /transport_agreements.xml?product_id=bring_servicepakke HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678
Pseudocode
http = new HTTPRequest(); http.method = 'GET'; http.url = 'https://cargonizer.no/transport_agreements.xml?product_id=bring_servicepakke'; http.queryStringParameters.set('product_id', 'bring_servicepakke'); http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); response = http.execute();

XML Response Error

This section discusses the XML response that may accompany a failed API request. When an API request fails, Cargonizer will return an XML response that provides more specific information about the error(s) that caused the failure.

Error messages from Cargonizer will have the following format when an error occures:

<errors> All lines describing the error will come under this node
<error> Textline describing the error

Example:

<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>This action requires authentication</error>
</errors>

 

 

 

Developer: Cargonizer API Documentation © Logistra AS   Øran Vest, 6300 Åndalsnes   Denne e-postadressen er beskyttet mot programmer som samler e-postadresser. Du må aktivere javaskript for å kunne se den.logistra facebook icon logistra twitter icon

Vi bruker informasjonskapsler (cookies) for å forbedre bruksopplevelsen og for å kunne føre statistikk over våre besøkende.