Add a New Stock Item
Add new stock items to BigChange.
Query String Parameters
Name | Type | Description | Required |
---|---|---|---|
Action | String | AddStock | Required |
StockTypeName | String(100) | Name of stock type category e.g. Cars, Vans, bicycles | Required |
StockMake | String(100) | Make of stock e.g. BMW | Required |
StockModel | String(100) | Model of stock e.g. 6-Series | Required |
ItemSerialNo | String(120) | Serial number of a physical stock item | Required |
StockModelNumber | String(100) | Model number of stock e.g. 6-Series GTI. | Optional |
Quantity | Int | Quantity of stock. Defaults to 1. | Optional |
Usage | Double | Amount of stock usage. For Stock items that record a usage value such as hours used, mileage, days remaining etc. | Optional |
Notes | String(250) | Notes for stock. | Optional |
Created | Date | Date stock added. Defaults to 'Now'. | Optional |
ReplaceQty | Bool | If set to true overwrites the stock qty rather than default operation of accumulating. Default is false. | Optional |
SellingPrice | Double | Selling price of the stock item. | Optional |
Size | Double | Size of stock item. | Optional |
Weight | Double | Weight of stock Item. | Optional |
SupplierName | String(50) | Name of supplier. | Optional |
SupplierRef | String(40) | Reference of supplier. | Optional |
SupplierCost | Double | Suppliers charge for stock item. | Optional |
SupplierCurrency | String | Suppliers currency code, e.g. Uk Stirling = "GBP". | Optional |
ContactName | String(50) | Name of contact to add stock. | Optional |
ContactReference | String(40) | The reference of the contact to add stock to. Used to identify the correct contact. | Optional |
VehicleRegistration | String(40) | Registration of vehicle. Used if stock is to be placed in to van stock. Must be a valid existing vehicle registered on BigChange. | Optional |
StockCode | String(100) | Identifies tha code for the stock item | Optional |
StockBatchCode | String(100) | Identifies tha batch code for the stock item. | Optional |
IsEquipment | Bool | Signifies if the stock item is equipment. | Optional |
SoldDate | DateTime | Set the "sold date". | Optional |
CurrentStockItemRef | String(120) | Optional reference to a part stock item. If supplied, this stock item is treated as a "part" | Optional |
CustomerSerialNumber | String(120) | Customer serial number. | Optional |
SupplierSerialNumber | String(120) | Suppliers serial number. | Optional |
AltSerialNumber | String (120) | Alternative serial number. | Optional |
tip
Please note, subsequent calls will not update Size, Weight or Selling Price.
Response Codes
Code | Message | Information |
---|---|---|
0 | Response Data | See 'Response' example tab |
2 | Invalid contactid | Integer value is invalid or was not specified (when required) |
2 | Invalid currentstockitemref | No record found using the specified parameters |
2 | {parameter} too long Max length is : {parameter} characters : {x} Submission is : {x} characters in length " | The parameter value for the named parameter shown in the response is too long |
Example
- Request
- Response
Request URL
https://webservice.bigchange.com/v01/services.ashx?action=AddStock&StockTypeName=Test Stock Type Name&StockMake=Test Stock Make&StockModel=Test Stock Model&ItemSerialNo=123456789
Response Data
{ "Code": 0, "Result": { "itemId": 650562, "stockId": 15753667 } }