Skip to main content

InventoryDiscrepancy Services

All services related to InventoryDiscrepancy are listed in this page.

GET List InventoryDiscrepancy

This service is used to get a list of InventoryDiscrepancy.

Path: /api/v1/oms/inventory-discrepancies/

Query Parameters

The following query parameters can be used to get the list of InventoryDiscrepancy.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get list of InventoryDiscrepancy, a GET request should be sent to /api/v1/oms/inventory-discrepancies/ endpoint. No query parameters or request body are required.

Here's an example of how to make the request in python:


import requests

url = "https://{oms_base_url}/api/v1/oms/inventory-discrepancies/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token)
}

response = requests.request("GET", url, headers=headers)

print(response.json())

Example Response (200 OK)

In a successful response with a status code of 200 OK, the API returns the list of InventoryDiscrepancy information.

This example response serves as a reference to understand the structure and data format returned from this API service.

{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"reason": "out_of_stock",
"created_date": "2023-01-01T14:09:34.934060Z",
"modified_date": "2023-01-01T14:09:34.934069Z",
"is_active": true,
"stock_location": 1,
"package_item": 11111,
"transfer_item": null
}
]
}

GET Get InventoryDiscrepancy Detail

This service is used to get detail about InventoryDiscrepancy.

Path: /api/v1/oms/inventory-discrepancies/<pk>

Query Parameters

The following query parameters can be used to get detail about InventoryDiscrepancy.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get detail about InventoryDiscrepancy, a GET request should be sent to /api/v1/oms/inventory-discrepancies/<pk> endpoint. No query parameters or request body are required.

ParameterData TypeDescription
pkintegerThe ID of the discrepancy record
reasonstringThe reason type of the discrepancy record
stock_locationintegerThe location value of the discrepancy record
is_activebooleanThe status of the discrepancy record
package_itemintegerThe Package Item id of the discrepancy record
transfer_itemintegerThe Transfer Item id of the discrepancy record

Here's an example of how to make the request in python:

import requests

url = "https://{oms_base_url}/api/v1/oms/inventory-discrepancies/<pk>"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token)
}

response = requests.request("GET", url, headers=headers)

print(response.json())

Example Response (200 OK)

In a successful response with a status code of 200 OK, the API returns InventoryDiscrepancy detail.

This example response serves as a reference to understand the structure and data format returned from this API service.

{
"id": 1,
"reason": "out_of_stock",
"created_date": "2023-01-01T14:09:34.934060Z",
"modified_date": "2023-01-01T14:09:34.934069Z",
"is_active": true,
"stock_location": 1,
"package_item": 11111,
"transfer_item": null
}

POST Remove InventoryDiscrepancy

This service is used to remove an InventoryDiscrepancy record.

Path: /api/v1/oms/inventory-discrepancies/remove/

Query Parameters

The following query parameters can be used to remove an InventoryDiscrepancy.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To remove an InventoryDiscrepancy, a POST request should be sent to /api/v1/oms/inventory-discrepancies/remove/ endpoint.

ParameterData TypeDescription
expired_datestringThe expired date deletes discrepancy records starting from the expired date
stock_locationintegerThe stock location for remove discrepancy record

Here's an example of how to make the request in python:


import requests

url = "https://{oms_base_url}/api/v1/oms/inventory-discrepancies/remove/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token)
}

payload = {
"expired_date": "10-10-2023"
}

# Another payload -> If you want to remove for one location.

payload = {'expired_date': "10-10-2023",
'stock_location': <stock-location-pk> }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.json())

Example Response (204 No Content)

A successful response is returned with a status code of 204 NO-CONTENT.