<commit_before>---
title: Dotcom Distribution Endpoint
---

## Overview

[Dotcom Distribution](http://www.dotcomdist.com/) is the premier provider of logistics and fulfillment services to growing retailers & manufacturers.

+++
The source code for the [Dotcom Distribution Endpoint](https://github.com/spree/dotcom_endpoint/) is available on Github.
+++

## Services

### Send Shipment

Send a shipment to Dotcom Distribution.

#### Request

---shipment_ready.json---
```json
{
    "message_id": "51af1dc5fe53543f1200f519",
    "message": "shipment:ready",
    "payload": {
      "shipment": {
        "number": "H67606710123",
        "order_number": "R805661123",
        "email": "<EMAIL>",
        "cost": 10.0,
        "status": "ready",
        "stock_location": null,
        "shipping_method": "Standard",
        "tracking": null,
        "updated_at": null,
        "shipped_at": null,
        "shipping_address": {
          "firstname": "Brian",
          "lastname": "Quinn",
          "address1": "2 Wisconsin Cir.",
          "address2": "",
          "zipcode": "20815",
          "city": "Chevy Chase",
          "state": "Maryland",
          "country": "US",
          "phone": "555-123-123"
        },
        "items": [
          {
            "name": "Socks",
            "sku": "9011CC",
            "external_ref": "",
            "quantity": 1,
            "price": 29.0,
            "variant_id": 4123,
            "options": {
              "size": "M",
              "color": "BLK"
            }
          },
          {
            "name": "Shoes",
            "sku": "2001SSBM",
            "external_ref": "",
            "quantity": 1,
            "price": 27.0,
            "variant_id": 4321,
            "options": {
              "option-name": "value"
            }
          },
          {
            "name": "Feet",
            "sku": "2002SSBS",
            "external_ref": "",
            "quantity": 1,
            "price": 29.0,
            "variant_id": 1234,
            "options": {
              "toes": "present"
            }
          }
        ]
      },
      "order": {},
      "original": {}
      ]
    }
}
```

#### Response

---notification_info.json---

```json
{
  "message_id": "51af1dc5fe53543f1200f519",
  "notifications": [
    {
      "level": "info",
      "subject": "Successfully Sent Shipment to Dotcom Distribution",
      "description": "Successfully Sent Shipment to Dotcom Distribution"
    }
  ]
}
```

### Tracking

Track shipment dispatches.

#### Request

---dotcom_shipment_results_poll.json---
```json

{
  "message_id": "51af1dc5fe53543f1200f519",
  "message": "dotcom:shipment_results:poll",
  "payload": {}
}
```

#### Parameters

| Name | Value | Example |
| :----| :-----| :------ |
| api_key | Your Dotcom Distribution API key | <KEY> |
| password | Your Dotcom Distribution account password | <KEY> |
| last_polling_datetime | Initial date shipment polling will start from | 2013-01-01 |

#### Response

---shipment_confirm.json---
```json
{
  "message_id": "51af1dc5fe53543f1200f519",
  "messages": [
    {
      "message": "shipment:confirm",
      "payload": {
        "shipment": {
          "number": "70201201334520004",
          "order_number": "104-0444357-8954627",
          "tracking_number": "915293072790136"
        }
      },
      "parameters": [
        {
          "name": "dotcom.last_polling_datetime",
          "value": "2013-05-05"
        }
      ]
    }
  ]
}
```<commit_msg>Updating Dotcom integration docs<commit_after>---
title: Dotcom Distribution Endpoint
---

## Overview

[Dotcom Distribution](http://www.dotcomdist.com/) is the premier provider of logistics and fulfillment services to growing retailers & manufacturers.

+++
The source code for the [Dotcom Distribution Endpoint](https://github.com/spree/dotcom_endpoint/) is available on Github.
+++

## Services

### Send Shipment

Send a shipment to Dotcom Distribution.

#### Request

---shipment_ready.json---
```json
{
    "message_id": "51af1dc5fe53543f1200f519",
    "message": "shipment:ready",
    "payload": {
      "shipment": {
        "number": "H67606710123",
        "order_number": "R805661123",
        "email": "<EMAIL>",
        "cost": 10.0,
        "status": "ready",
        "stock_location": null,
        "shipping_method": "Standard",
        "tracking": null,
        "updated_at": null,
        "shipped_at": null,
        "shipping_address": {
          "firstname": "Brian",
          "lastname": "Quinn",
          "address1": "2 Wisconsin Cir.",
          "address2": "",
          "zipcode": "20815",
          "city": "Chevy Chase",
          "state": "Maryland",
          "country": "US",
          "phone": "555-123-123"
        },
        "items": [
          {
            "name": "Socks",
            "sku": "9011CC",
            "external_ref": "",
            "quantity": 1,
            "price": 29.0,
            "variant_id": 4123,
            "options": {
              "size": "M",
              "color": "BLK"
            }
          },
          {
            "name": "Shoes",
            "sku": "2001SSBM",
            "external_ref": "",
            "quantity": 1,
            "price": 27.0,
            "variant_id": 4321,
            "options": {
              "option-name": "value"
            }
          }
        ]
      },
      "order": {},
      "original": {}
      ]
    }
}
```

#### Parameters

| Name | Value | Data Type |Example |
| :----| :-----| :------ |:------ |
| api_key | Your Dotcom Distribution API key | string | <KEY> |
| password | Your Dotcom Distribution account password | string | <KEY> |
| shipping_lookup | Spree to Dotcom Distribution shipping methods' mapping | list | [{'UPS Ground (USD)' => '03'}, {'UPS Two Day (USD)' => '02'}] |

#### Response

---notification_info.json---

```json
{
  "message_id": "51af1dc5fe53543f1200f519",
  "notifications": [
    {
      "level": "info",
      "subject": "Successfully Sent Shipment to Dotcom Distribution",
      "description": "Successfully Sent Shipment to Dotcom Distribution"
    }
  ]
}
```

### Tracking

Track shipment dispatches.

#### Request

---dotcom_shipment_results_poll.json---
```json

{
  "message_id": "51af1dc5fe53543f1200f519",
  "message": "dotcom:shipment_results:poll",
  "payload": {}
}
```

#### Parameters

| Name | Value | Data Type |Example |
| :----| :-----| :------ |:------ |
| api_key | Your Dotcom Distribution API key | string |<KEY> |
| password | Your Dotcom Distribution account password | string| <KEY> |
| last_polling_datetime | Initial date shipment polling will start from | string | 2013-10-28 3:15:21 -0400 |

#### Response

---shipment_confirm.json---
```json
{
  "message_id": "51af1dc5fe53543f1200f519",
  "messages": [
    {
      "message": "shipment:confirm",
      "payload": {
        "shipment": {
          "number": "H662132822",
          "order_number": "R894254432",
          "tracking": "1ZV2X5140100003086"
        }
      },
      "parameters": [
        {
          "name": "dotcom.last_polling_datetime",
          "value": "2013-10-29 3:15:21 -0400"
        }
      ]
    }
  ]
}
```
{'fraction_non_alphanumeric': 0.17256327786323591, 'fraction_numerical': 0.05649559502167529, 'mean_word_length': 1.9651741293532339, 'pattern_counts': {'":': 134, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3630247', 'n_tokens_mistral': 2563, 'n_tokens_neox': 2251, 'n_words': 480}