Features - Connectors Framework - Inbound REST API - Pricelists
Edit pricelist
Overview
Updating pricelist info in MobiWork
URL Format
https://{domain}.mobiwork.com/api/rest/{clientId}/{versionNumber}/pricelist/{pricelistId}/update.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
pricelistId
required
The identifier of the pricelist to be retrieved
Return
Returns a pricelist Object if pricelist update 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/pricelist/501268/update.html?token=COJL8X2FKSLMMRTYCH2B" -data '<request>
<pricelist>
<categoryId>0</categoryId>
<categoryName></categoryName>
<createdBy></createdBy>
<createdById>0</createdById>
<createdDate>2019/07/24</createdDate>
<customerCategoryList>
<priceListCustomerCategory>
<customerCategoryId>0</customerCategoryId>
<customerCategoryName></customerCategoryName>
<productPriceListCustomerCategoryId>0</productPriceListCustomerCategoryId>
<productPriceListId>0</productPriceListId>
</priceListCustomerCategory>
</customerCategoryList>
<customerList>
<priceListCustomer>
<customerExternalId></customerExternalId>
<customerId>0</customerId>
<customerName></customerName>
<productPriceListCustomerId>0</productPriceListCustomerId>
<productPriceListId>0</productPriceListId>
</priceListCustomer> </customerList> <customStatusId>0</customStatusId> <customStatusName></customStatusName> <discountAmount>0</discountAmount> <discountPercent>0</discountPercent> <externalId></externalId> <mobiworkProductPriceListId>0</mobiworkProductPriceListId> <name></name> <priceListCustomerType></priceListCustomerType> <priceListPriceType></priceListPriceType> <productList> <priceListProduct> <price>0</price> <productExternalId></productExternalId> <productId>0</productId> <productName></productName> <productPriceListId>0</productPriceListId> <productPriceListProductId>0</productPriceListProductId> </priceListProduct> </productList> </pricelist> </request>'
Response: <?xml version="1.0" encoding="UTF-8" ?>
<response version="6.0.3" statusCode="1">
<productPriceList>
<createdDate>07/24/2019</createdDate>
<categoryId>0</categoryId>
<categoryName>null</categoryName>
<createdBy>Mobi Admin</createdBy>
<createdById>1</createdById>
<customStatusId>0</customStatusId>
<customStatusName>null</customStatusName>
<customerCategoryList></customerCategoryList>
<customerList></customerList>
<discountAmount>0.0</discountAmount>
<discountPercent>0.0</discountPercent>
<externalId>null</externalId>
<mobiworkProductPriceListId>1</mobiworkProductPriceListId>
<name>Test pricelist</name>
<priceListCustomerType>CUSTOMER_LIST</priceListCustomerType>
<priceListPriceType>INDIVIDUAL_PRODUCT_PRICE</priceListPriceType>
<productList>
<priceListProduct>
<productPriceListId>1</productPriceListId>
<price>0.0</price>
<productExternalId>A11030</productExternalId>
<productId>11</productId>
<productName>Fluorescent Desk Lamp</productName>
<productPriceListProductId>2</productPriceListProductId>
</priceListProduct>
<priceListProduct>
<productPriceListId>1</productPriceListId>
<price>0.0</price>
<productExternalId>A11050</productExternalId>
<productId>12</productId>
<productName>13W Mini Fluorescent Bulb</productName>
<productPriceListProductId>3</productPriceListProductId>
</priceListProduct>
</productList>
</productPriceList>
</response>