View as Markdown

Api Credentials

Category: Admin Base URL: /admin/api-credentials Authentication: Required Routes: 5 routes documented

Overview#

This section documents 5 API routes for api credentials.

⚠️ These endpoints operate on your live store. POST/PUT/DELETE operations here — including sync, push, resync, and cache operations — modify or delete production data, and some trigger downstream effects such as warehouse orders or customer emails. DELETE operations are generally irreversible. Verify IDs and parameters carefully before calling them from scripts.

Quick Reference#

Method Endpoint Description
GET /admin/api-credentials // GET - List all API credentials
POST /admin/api-credentials // POST - Create new API credentials
GET /admin/api-credentials/:id // GET - Get specific credential (masked)
PUT /admin/api-credentials/:id // PUT - Update credential
DELETE /admin/api-credentials/:id // DELETE - Delete credential
GET /admin/api-credentials/:id/masked // GET - Get credential with masked values
POST /admin/api-credentials/:id/validate // POST - Validate credential
GET /admin/api-credentials/adapters // GET - List available adapter types

GET Admin Api-credentials#

Endpoint: GET /admin/api-credentials Authentication: Admin (Required)

Description#

// GET - List all API credentials

Response#

Success:

{
  success,
  credentials,
}

Error (500):

{
  success,
  error,
}

Example Request#

curl -X GET 'https://your-store.omnicart.cc/admin/api-credentials' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'

POST Admin Api-credentials#

Endpoint: POST /admin/api-credentials Authentication: Admin (Required)

Description#

// POST - Create new API credentials

Request Body#

This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body.

Response#

Success (201):

{
  success,
  credential,
}

Also returns:

{
  success,
  error,
}

Example Request#

curl -X POST 'https://your-store.omnicart.cc/admin/api-credentials' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'

GET Admin Api-credentials :id#

Endpoint: GET /admin/api-credentials/:id Authentication: Admin (Required)

Description#

// GET - Get specific credential (masked)

URL Parameters#

Parameter Type Required Description
id string Yes Id identifier

Response#

Success:

{
  success,
  credential,
}

Also returns:

{
  success,
  error,
}

Example Request#

curl -X GET 'https://your-store.omnicart.cc/admin/api-credentials/:id' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'

PUT Admin Api-credentials :id#

Endpoint: PUT /admin/api-credentials/:id Authentication: Admin (Required)

Description#

// PUT - Update credential

URL Parameters#

Parameter Type Required Description
id string Yes Id identifier

Request Body#

This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body.

Response#

Success:

{
  success,
  credential,
}

Error (500):

{
  success,
  error,
}

Example Request#

curl -X PUT 'https://your-store.omnicart.cc/admin/api-credentials/:id' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'

DELETE Admin Api-credentials :id#

Endpoint: DELETE /admin/api-credentials/:id Authentication: Admin (Required)

Description#

// DELETE - Delete credential

URL Parameters#

Parameter Type Required Description
id string Yes Id identifier

Response#

Success:

{
  success,
  message,
}

Error (500):

{
  success,
  error,
}

Example Request#

curl -X DELETE 'https://your-store.omnicart.cc/admin/api-credentials/:id' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'

GET Admin Api-credentials :id Masked#

Endpoint: GET /admin/api-credentials/:id/masked Authentication: Admin (Required)

Description#

// GET - Get credential with masked values

URL Parameters#

Parameter Type Required Description
id string Yes Id identifier

Response#

Success:

{
  success,
  credentials,
}

Also returns:

{
  success,
  error,
}

Example Request#

curl -X GET 'https://your-store.omnicart.cc/admin/api-credentials/:id/masked' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'

POST Admin Api-credentials :id Validate#

Endpoint: POST /admin/api-credentials/:id/validate Authentication: Admin (Required)

Description#

// POST - Validate credential

URL Parameters#

Parameter Type Required Description
id string Yes Id identifier

Request Body#

This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body.

Response#

Success:

{
  success,
  validation,
}

Error (500):

{
  success,
  error,
}

Example Request#

curl -X POST 'https://your-store.omnicart.cc/admin/api-credentials/:id/validate' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'

GET Admin Api-credentials Adapters#

Endpoint: GET /admin/api-credentials/adapters Authentication: Admin (Required)

Description#

// GET - List available adapter types

Response#

Success:

{
  success,
  adapters,
}

Error (500):

{
  success,
  error,
}

Example Request#

curl -X GET 'https://your-store.omnicart.cc/admin/api-credentials/adapters' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'