Orishare
API reference
GET
/imports

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048
status?string

Value in

  • "draft"
  • "ready"
  • "blocked"
  • "running"
  • "completed"

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/imports"
{  "data": [    {      "id": "string",      "vendor": "smile",      "status": "draft",      "currency_id": "string",      "tier_program_id": "string",      "create_customers": true,      "allow_existing": true,      "match_by": "external_id",      "chunk_count": 0,      "content_bytes": 0,      "rows_total": 0,      "source_balance": "string",      "source_lifetime_earned": "string",      "counts": {        "pending": 0,        "imported": 0,        "skipped": 0,        "failed": 0,        "invalid": 0      },      "report": {        "blocking": true,        "file_errors": [          {            "code": "string",            "message": "string"          }        ],        "columns": {          "property1": "string",          "property2": "string"        },        "records": 0,        "valid_rows": 0,        "invalid_rows": 0,        "to_import": 0,        "to_create": 0,        "skip_existing_balance": 0,        "skip_already_imported": 0,        "skip_customer_not_found": 0,        "rows_with_warnings": 0,        "source_balance": "string",        "source_lifetime_earned": "string",        "errors": [          {            "code": "string",            "message": "string",            "row_number": 0,            "external_id": "string",            "email": "string"          }        ]      },      "dry_run_at": "2019-08-24T14:15:22Z",      "started_at": "2019-08-24T14:15:22Z",      "completed_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/imports

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/imports" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "vendor": "generic",    "currency": "points"  }'
{  "id": "string",  "vendor": "smile",  "status": "draft",  "currency_id": "string",  "tier_program_id": "string",  "create_customers": true,  "allow_existing": true,  "match_by": "external_id",  "chunk_count": 0,  "content_bytes": 0,  "rows_total": 0,  "source_balance": "string",  "source_lifetime_earned": "string",  "counts": {    "pending": 0,    "imported": 0,    "skipped": 0,    "failed": 0,    "invalid": 0  },  "report": {    "blocking": true,    "file_errors": [      {        "code": "string",        "message": "string"      }    ],    "columns": {      "property1": "string",      "property2": "string"    },    "records": 0,    "valid_rows": 0,    "invalid_rows": 0,    "to_import": 0,    "to_create": 0,    "skip_existing_balance": 0,    "skip_already_imported": 0,    "skip_customer_not_found": 0,    "rows_with_warnings": 0,    "source_balance": "string",    "source_lifetime_earned": "string",    "errors": [      {        "code": "string",        "message": "string",        "row_number": 0,        "external_id": "string",        "email": "string"      }    ]  },  "dry_run_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/imports/{id}/chunks

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/imports/string/chunks" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "sequence": 0,    "content": "external_id,email,points_balance,lifetime_points,tier,birthday\\nc-1,[email protected],120,500,Gold,1990-04-12\\n"  }'
{  "id": "string",  "vendor": "smile",  "status": "draft",  "currency_id": "string",  "tier_program_id": "string",  "create_customers": true,  "allow_existing": true,  "match_by": "external_id",  "chunk_count": 0,  "content_bytes": 0,  "rows_total": 0,  "source_balance": "string",  "source_lifetime_earned": "string",  "counts": {    "pending": 0,    "imported": 0,    "skipped": 0,    "failed": 0,    "invalid": 0  },  "report": {    "blocking": true,    "file_errors": [      {        "code": "string",        "message": "string"      }    ],    "columns": {      "property1": "string",      "property2": "string"    },    "records": 0,    "valid_rows": 0,    "invalid_rows": 0,    "to_import": 0,    "to_create": 0,    "skip_existing_balance": 0,    "skip_already_imported": 0,    "skip_customer_not_found": 0,    "rows_with_warnings": 0,    "source_balance": "string",    "source_lifetime_earned": "string",    "errors": [      {        "code": "string",        "message": "string",        "row_number": 0,        "external_id": "string",        "email": "string"      }    ]  },  "dry_run_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/imports/{id}/dry_run

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/imports/string/dry_run" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "vendor": "smile",  "status": "draft",  "currency_id": "string",  "tier_program_id": "string",  "create_customers": true,  "allow_existing": true,  "match_by": "external_id",  "chunk_count": 0,  "content_bytes": 0,  "rows_total": 0,  "source_balance": "string",  "source_lifetime_earned": "string",  "counts": {    "pending": 0,    "imported": 0,    "skipped": 0,    "failed": 0,    "invalid": 0  },  "report": {    "blocking": true,    "file_errors": [      {        "code": "string",        "message": "string"      }    ],    "columns": {      "property1": "string",      "property2": "string"    },    "records": 0,    "valid_rows": 0,    "invalid_rows": 0,    "to_import": 0,    "to_create": 0,    "skip_existing_balance": 0,    "skip_already_imported": 0,    "skip_customer_not_found": 0,    "rows_with_warnings": 0,    "source_balance": "string",    "source_lifetime_earned": "string",    "errors": [      {        "code": "string",        "message": "string",        "row_number": 0,        "external_id": "string",        "email": "string"      }    ]  },  "dry_run_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/imports/{id}/purge_content

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/imports/string/purge_content" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "purged_chunks": -9007199254740991,  "content_purged_at": "string"}
POST
/imports/{id}/run

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/imports/string/run" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "limit": 100  }'
{  "id": "string",  "status": "draft",  "processed": 0,  "counts": {    "pending": 0,    "imported": 0,    "skipped": 0,    "failed": 0,    "invalid": 0  },  "has_more": true}
GET
/imports/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/imports/string"
{  "id": "string",  "vendor": "smile",  "status": "draft",  "currency_id": "string",  "tier_program_id": "string",  "create_customers": true,  "allow_existing": true,  "match_by": "external_id",  "chunk_count": 0,  "content_bytes": 0,  "rows_total": 0,  "source_balance": "string",  "source_lifetime_earned": "string",  "counts": {    "pending": 0,    "imported": 0,    "skipped": 0,    "failed": 0,    "invalid": 0  },  "report": {    "blocking": true,    "file_errors": [      {        "code": "string",        "message": "string"      }    ],    "columns": {      "property1": "string",      "property2": "string"    },    "records": 0,    "valid_rows": 0,    "invalid_rows": 0,    "to_import": 0,    "to_create": 0,    "skip_existing_balance": 0,    "skip_already_imported": 0,    "skip_customer_not_found": 0,    "rows_with_warnings": 0,    "source_balance": "string",    "source_lifetime_earned": "string",    "errors": [      {        "code": "string",        "message": "string",        "row_number": 0,        "external_id": "string",        "email": "string"      }    ]  },  "dry_run_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/imports/{id}/rows

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048
status?string

Value in

  • "pending"
  • "imported"
  • "skipped"
  • "failed"
  • "invalid"

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/imports/string/rows"
{  "data": [    {      "row_number": 0,      "status": "pending",      "preview": "import",      "external_id": "string",      "email": "string",      "balance": 0,      "lifetime_earned": 0,      "tier": "string",      "tier_done": true,      "birthday": {        "month": 0,        "day": 0,        "year": 0      },      "customer_id": "string",      "ledger_customer_id": "string",      "earn_entry_id": "string",      "spent_entry_id": "string",      "error": {        "code": "string",        "message": "string"      },      "warnings": [        {          "code": "string",          "message": "string"        }      ],      "processed_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
GET
/imports/{id}/report

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/imports/string/report"
{  "id": "string",  "status": "draft",  "currency_id": "string",  "counts": {    "pending": 0,    "imported": 0,    "skipped": 0,    "failed": 0,    "invalid": 0  },  "complete": true,  "source": {    "rows": 0,    "balance": "string",    "lifetime_earned": "string"  },  "eligible": {    "rows": 0,    "balance": "string",    "lifetime_earned": "string"  },  "imported": {    "rows": 0,    "balance": "string",    "lifetime_earned": "string"  },  "excluded": {    "rows": 0,    "balance": "string",    "lifetime_earned": "string",    "reasons": {      "property1": 0,      "property2": 0    }  },  "skipped": {    "rows": 0,    "balance": "string",    "lifetime_earned": "string"  },  "failed": {    "rows": 0,    "balance": "string",    "lifetime_earned": "string"  },  "pending": {    "rows": 0,    "balance": "string",    "lifetime_earned": "string"  },  "ledger": {    "balance": "string",    "lifetime_earned": "string",    "entries": 0,    "mismatched_rows": 0,    "unexpected_entries": 0  },  "mismatches": [    {      "row_number": 0,      "reason": "string"    }  ],  "balanced": true,  "eligible_reconciled": true,  "imported_subset_reconciled": true,  "first_errors": [    {      "row_number": 0,      "status": "string",      "code": "string",      "message": "string"    }  ]}