curl -X POST \
https://oddconnect.com/api/connections \
-H 'accept: application/json' \
-H 'authorization: bearer your-org-token-here' \
-H 'content-type: application/json' \
-d '{
"data": {
"type": "connection",
"attributes": {
"email": "[email protected]",
"device_urn": "dev:123"
}
}
}'
Status: 400
, 401
, 403
, 422
Format:
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "Invalid/malformed request"
}
]
}
Status: 201
{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "connection",
"id": "ecf96bde-42e0-46a5-9e30-bd641250b6e2",
"attributes": {
"organization_urn": "your-org-urn",
"expires_at": "2017-05-03T02:25:42Z",
"email": "[email protected]",
"device_urn": "dev:123"
}
}
}
curl -X GET \
https://oddconnect.com/api/connections/ecf96bde-42e0-46a5-9e30-bd641250b6e2 \
-H 'accept: application/json' \
-H 'authorization: bearer your-org-token-here' \
-H 'content-type: application/json'
Status: 400
, 401
, 403
, 422
Format:
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "Invalid/malformed request"
}
]
}
Status: 200
{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "connection",
"id": "ecf96bde-42e0-46a5-9e30-bd641250b6e2",
"attributes": {
"verified_at": "2017-05-03T02:21:42",
"jwt": "a-jwt-for-your-connection",
"organization_urn": "your-org-urn",
"email": "[email protected]",
"device_urn": "dev:123"
}
}
}
curl -X GET \
https://oddconnect.com/api/device_users/[email protected] \
-H 'accept: application/json' \
-H 'authorization: bearer your-org-token-here' \
-H 'content-type: application/json'
Status: 400
, 401
, 403
, 422
Format:
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "Invalid/malformed request"
}
]
}
Status: 200
{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "device_user",
"id": "ecf96bde-42e0-46a5-9e30-bd641250b6e2",
"attributes": {
"email": "[email protected]"
}
}
}
curl -X POST \
https://oddconnect.com/api/device_users/[email protected]/transactions \
-H 'accept: application/json' \
-H 'authorization: bearer your-org-token-here' \
-H 'content-type: application/json' \
-d '{
"data": {
"type": "transaction",
"attributes": {
"platform": "ROKU",
"roku_product_id": "xxxxx",
"roku_transaction_id": "yyyyy-yyyyyy-yyyyyyy-yyyyyyyy",
"receipt": {
"roku_field": "roku_value"
}
}
}
}'
Status: 400
, 401
, 403
, 422
Format:
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "Invalid/malformed request"
}
]
}
Status: 201
{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "transaction",
"id": "ecf96bde-42e0-46a5-9e30-bd641250b6e2",
"attributes": {
"urn": "urn:roku:transaction:yyyyy-yyyyyy-yyyyyyy-yyyyyyyy",
"platform": "ROKU",
"invalidated_at": null,
"receipt": {
"roku_field": "roku_value"
},
"email": "[email protected]",
"entitlement_urn": "whatever:your:entitlement:urn:is",
"product_urn": "urn:roku:product:xxxxx"
}
}
}