online-help.platform.features.premier_subscription.connectors.inbound-rest-api.endpoints.product.title
Add Product
Overview
Creates a Product in MobiWork
URL Format
https://{domain}/api/rest/{clientId}/{versionNumber}/product/add.html?token=XXXXXXXX&userId={userId}
Arguments
clientId
required
MobiWork assigned unique ID of the company
versionNumber
required
Version number of MobiWork API SDK release. Current version is: 10.0.78
token
required
Part of URL as a request parameter and is required in every call to verify access to API calls
userId
optional
If provided, this User ID will be taken as a logged in user. If not provided we use an active global administrator ID
Return
Returns a Product Object if product creation is successful or errors will be returned
Request Body XSD
Response Body XSD
Curl Example
HTTP Method: POST
Request: curl -k -X POST -H "https://www.mobiwork.com/api/rest/12014/10.0.78/product/add.html?token=COJL8X2FKSLMMRTYCH2B" -data '<request>
<product>
<externalId>API1113</externalId>
<name>Test API New 3</name>
<description>Test API New 3</description>
<type>PARTS_MATERIALS</type>
<price>77.76</price>
<cost>38.88</cost>
<quantity>1</quantity>
<sku></sku>
<modelNumber>152885555</modelNumber>
<hasSerialNumbers>false</hasSerialNumbers>
<priceIncludesTax>false</priceIncludesTax>
<taxable>true</taxable>
<tax>0.12</tax>
<enabled>true</enabled>
<category>Under ground fittings</category>
<customFields>
<customField>
<apiName>Field1</apiName>
<fieldType>1</fieldType>
<value></value>
<name>Field1</name>
</customField>
</customFields>
</product>
</request>'
Response: <?xml encoding="UTF-8" ?>
<response version="10.0.78" statusCode="1">
<product>
<mobiworkProductId>307969</mobiworkProductId>
<externalId>API1113</externalId>
<name>Test API New 3</name>
<description>Test API New 3</description>
<type>PARTS_MATERIALS</type>
<price>77.76</price>
<cost>38.88</cost>
<quantity>0</quantity>
<sku></sku>
<modelNumber>152885555</modelNumber>
<hasSerialNumbers>false</hasSerialNumbers>
<priceIncludesTax>true</priceIncludesTax>
<taxable>true</taxable>
<tax>0.12</tax>
<enabled>true</enabled>
<createdDate>2016/10/19</createdDate>
<categoryId>969</categoryId>
<category>Under ground fittings</category>
<customFieldList>
<customField>
<apiName>ProductImg</apiName>
<fieldType>25</fieldType>
<value></value>
<name>Product Img</name>
</customField>
<customField>
<apiName>Field1</apiName>
<fieldType>1</fieldType>
<value></value>
<name>Field1</name>
</customField>
</customFieldList>
</product>
</response>