Stock Providers
A general or special to brand provider can be defined via Provider model. The information of the stock provider defined in Whippy Ware needs to be identical to the defined information sent from the brand’s API. Otherwise, Whippy Ware will not be able to register the information received from the service into its own system.
List Providers
This method is used to get a list of provider objects.
GET
List-Providers
Path: /api/v1/providers/
Parameters
The following parameters can be used to get a list of provider objects.
api_token
string
header
The API key of the customer account
limit
integer
query
The amount of line items returned per page
page
string
query
The number of page returned
Example Request
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the provider
name
string
The name of the provider
code
string
The code of the provider
should_add_reservations
boolean
The status of the reservation
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the Provider
Provider Instance
This method is used to get the details of the provider object with the specified provider number.
GET
Provider-Instance
Path: /api/v1/providers/{provider_no}
Parameters
The following parameters can be used to get the details of the provider objects.
api_token
string
header
The API key of the customer account
{provider_id}
string
query
The ID number of the provider
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the provider
name
string
The name of the provider
code
string
The code of the provider
should_add_reservations
boolean
The status of the reservation
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the Provider
Create Provider
This method is used to create a provider object with the request body.
POST
Create-Provider
Path: /api/v1/providers/
Parameters
The following parameters can be used to create a provider object.
api_token
string
header
✓
The API key of the customer account
code
string
body
✓
The code of the provider
name
string
body
✓
The name of the provider
should_add_reservations
boolean
body
The status of the reservation
Example Request
Example Response (201 Created)
The response includes the following parameters.
id
integer
The primary key of the provider
name
string
The name of the provider
code
string
The code of the provider
should_add_reservations
boolean
The status of the reservation
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the Provider
Example Response (400 Bad Request)
Search Providers
This method is used to search provider objects with the specified filters.
GET
Search-Providers
Path: /api/v1/providers/?code__icontains=<string>&code=<string>&created_date__gt=<string>&created_date__gte=<string>&created_date__lt=<string>&created_date__lte=<string>&created_date=<string>&modified_date__gt=<string>&modified_date__gte=<string>&modified_date__lt=<string>&modified_date__lte=<string>&modified_date=<string>&is_active=<string>&name=<string>&sort=<string>&page=<integer>&limit=<integer>
Filters
The following parameters can be used to filter GET request results.
api_token
string
header
The API key of the customer account
code
string
query
The code of the provider
name
string
query
The name of the provider
is_active
boolean
query
The activation status of the rule
created_date
date
query
The creation date
modified_date
date
query
The last modified date
The following filters can be applied via the request URL.
Example Request
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the provider
name
string
The name of the provider
code
string
The code of the provider
should_add_reservations
boolean
The status of the reservation
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the Provider
Provider Partial Update
This method is used to partially update the specified provider object with PATCH request.
PATCH
Provider-Partial-Update
Path: /api/v1/providers/{rule_no}/
Parameters
The following parameters can be used to partially update the provider object.
api_token
string
header
The API key of the customer account
{provider_id}
string
query
The ID number of the provider
Example Request
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the provider
name
string
The name of the provider
code
string
The code of the provider
should_add_reservations
boolean
The status of the reservation
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the Provider
Example Response (400 Bad Request)
Provider Full Update
This method is used to update all fields of the specified provider object with PUT request.
PUT
Provider-Full-Update
Path: /api/v1/providers/{rule_no}/
Parameters
The following parameters can be used to full update the provider object.
api_token
string
header
The API key of the customer account
{provider_id}
string
query
The ID number of the provider
Example Request
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the provider
name
string
The name of the provider
code
string
The code of the provider
should_add_reservations
boolean
The status of the reservation
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the Provider
Example Response (400 Bad Request)
Last updated
Was this helpful?