Back to Top

Nomad Hawk

1.1.0

This is the API descriptor for the Nomad Hawk API, responsible for tracking and analytics.

This is the documentation for version 1.1.0 of the API. Last update on Mar 20, 2020.

Base URL
https://nomad.samarkand-global.cn/hawk

Track

POST /track

Sends an event to hawk

Body Required

Event to track

Responses
POST /track
curl \
 -X POST https://nomad.samarkand-global.cn/hawk/track \
 -H "Content-Type: application/json" \
 -d '{"type":"event","category":"order","label":"order_create_failed","message":"Couldnt create order","location_city":"London","location_country":"United Kingdom","company":"Apple, Inc","value":"https://some.url","value_type":"url","source":"odoo","sales_channel":"Onion (B2C)","user":"vessy","id":"ABC123","items":[{"item_name":"Can of beans","item_price":10.1,"item_quantity":1,"item_category":"Food","item_barcode":55001234567890,"item_currency":"EUR","item_brand":"Apple"}]}'
Request example
{
  "type": "event",
  "category": "order",
  "label": "order_create_failed",
  "message": "Couldnt create order",
  "location_city": "London",
  "location_country": "United Kingdom",
  "company": "Apple, Inc",
  "value": "https://some.url",
  "value_type": "url",
  "source": "odoo",
  "sales_channel": "Onion (B2C)",
  "user": "vessy",
  "id": "ABC123",
  "items": [
    {
      "item_name": "Can of beans",
      "item_price": 10.1,
      "item_quantity": 1,
      "item_category": "Food",
      "item_barcode": 55001234567890,
      "item_currency": "EUR",
      "item_brand": "Apple"
    }
  ]
}
Response example (200)
{
  "code": 42,
  "message": "string",
  "type": "string",
  "data": {
    "foobar": "string"
  },
  "connectorResponses": [
    {
      "input": "{\"product_id\": 12121}",
      "operation_name": "GetProductOp",
      "api": [
        "string"
      ],
      "http_request_raw_data": "-",
      "code": 42,
      "response": "string",
      "response_en": "string",
      "platform": "youzan",
      "request_count": 1
    }
  ]
}

TrackWithStore

POST /track/{store_id}

Sends an event to hawk

Path parameters
  • store_id Required / string

    Store id of tracked event

Body Required

Event to track

Responses
POST /track/{store_id}
curl \
 -X POST https://nomad.samarkand-global.cn/hawk/track/{store_id} \
 -H "Content-Type: application/json" \
 -d '{"type":"event","category":"order","label":"order_create_failed","message":"Couldnt create order","location_city":"London","location_country":"United Kingdom","company":"Apple, Inc","value":"https://some.url","value_type":"url","source":"odoo","sales_channel":"Onion (B2C)","user":"vessy","id":"ABC123","items":[{"item_name":"Can of beans","item_price":10.1,"item_quantity":1,"item_category":"Food","item_barcode":55001234567890,"item_currency":"EUR","item_brand":"Apple"}]}'
Request example
{
  "type": "event",
  "category": "order",
  "label": "order_create_failed",
  "message": "Couldnt create order",
  "location_city": "London",
  "location_country": "United Kingdom",
  "company": "Apple, Inc",
  "value": "https://some.url",
  "value_type": "url",
  "source": "odoo",
  "sales_channel": "Onion (B2C)",
  "user": "vessy",
  "id": "ABC123",
  "items": [
    {
      "item_name": "Can of beans",
      "item_price": 10.1,
      "item_quantity": 1,
      "item_category": "Food",
      "item_barcode": 55001234567890,
      "item_currency": "EUR",
      "item_brand": "Apple"
    }
  ]
}
Response example (200)
{
  "code": 42,
  "message": "string",
  "type": "string",
  "data": {
    "foobar": "string"
  },
  "connectorResponses": [
    {
      "input": "{\"product_id\": 12121}",
      "operation_name": "GetProductOp",
      "api": [
        "string"
      ],
      "http_request_raw_data": "-",
      "code": 42,
      "response": "string",
      "response_en": "string",
      "platform": "youzan",
      "request_count": 1
    }
  ]
}