CURL examples


Sending a product record

curl -X POST \
    -H"Content-Type: application/json" \
    -H 'X-Ometria-Auth: YOUR_ACCESS_TOKEN' \
    -d '...' \
    'https://api.ometria.com/v2/products/123'

Sending an order record

(id"123") See Order object schema.

curl -X POST \
    -H"Content-Type: application/json" \
    -H 'X-Ometria-Auth: YOUR_ACCESS_TOKEN' \
    -d '...' \
    'https://api.ometria.com/v2/orders/123'

Sending a contact record

(id"123", collection:"default") See Contact object schema.

curl -X POST \
    -H"Content-Type: application/json" \
    -H 'X-Ometria-Auth: YOUR_ACCESS_TOKEN' \
    -d '{"@type":"contact","id":"123","email":"john.smith@example.com","firstname":"John","lastname":"Smith"}' \
    'https://api.ometria.com/v2/contacts/default/123'

Sending an array of records via push API

(Contact id"123", collection:"default")

curl -X POST \
    -H"Content-Type: application/json" \
    -H 'X-Ometria-Auth: YOUR_ACCESS_TOKEN' \
    -d '[{"@type":"contact","@collection":"default","id":"123","email":"john.smith@example.com","firstname":"John","lastname":"Smith"}]' \
    'https://api.ometria.com/v2/push'