With our community of partners, you can get expert advice and training so you can be up and running in no time! SETUP PARTNERS

API Documentation

Cost Methods

Method Description
GET list Return a list of all costs
GET get/[uuid] Detailed information for a specific cost
POST add Add a cost
PUT update Update a cost
POST delete Delete a cost
POST delete all Delete all costs

GET list

Return a list of all costs

Parameters

Parameter Required? Description
page Required A maximum of 1000 cost items will be returned per request. The number of items returned will be indicated by the "Records" element. To fetch all the costs you will need to make multiple calls to the API with the page number incremented each time. When the "Records" element is set to 0 then all the costs have been returned.

EXAMPLE URL

https://api.xero.com/workflowmax/3.0/cost.api/list?page=1

Example Response

<Response>
  <Status>OK</Status> 
  <Records>2</Records> 
  <Costs>
    <Cost>
      <UUID>e873137a-7e07-49a0-8987-130e7418ad34</UUID>
      <Description>Widget</Description> 
      <Code /> 
      <Note /> 
      <UnitCost>100.00</UnitCost> 
      <UnitPrice>130.00</UnitPrice> 
      <Supplier>
        <UUID>b4aba080-01b7-4224-b5d6-21be340cc9e9</UUID>
        <Name>Widget Incorporated</Name> 
      </Supplier>
      <IncomeAccount />
      <CostOfSaleAccount />
    </Cost>
    <Cost>
      <UUID>892049ff-74d9-4aec-9a8a-e6412e997e4b</UUID>
      <Description>Widget 2</Description> 
      <Code /> 
      <Note /> 
      <UnitCost>200.00</UnitCost> 
      <UnitPrice>260.00</UnitPrice> 
      <Supplier>
        <UUID>b4aba080-01b7-4224-b5d6-21be340cc9e9</UUID>
        <Name>Widget Incorporated</Name> 
      </Supplier>
      <IncomeAccount />
      <CostOfSaleAccount />
    </Cost>
  </Costs>
</Response>

GET get/[uuid]

Detailed information for a specific cost

EXAMPLE URL

https://api.xero.com/workflowmax/3.0/cost.api/get/e873137a-7e07-49a0-8987-130e7418ad34

Example Response

<Response>
  <Status>OK</Status> 
  <Cost>
    <UUID>e873137a-7e07-49a0-8987-130e7418ad34</UUID>
    <Description>Widget</Description> 
    <Code /> 
    <Note /> 
    <UnitCost>100.00</UnitCost> 
    <UnitPrice>130.00</UnitPrice> 
    <Supplier>
      <UUID>b4aba080-01b7-4224-b5d6-21be340cc9e9</UUID>
      <Name>Widget Incorporated</Name> 
    </Supplier>
    <IncomeAccount />
    <CostOfSaleAccount />
  </Cost>
</Response>

POST add

Add a cost

EXAMPLE URL

https://api.xero.com/workflowmax/3.0/cost.api/add

Example Message

<Cost>
  <Description>Widget</Description> 
  <Code /> 
  <Note /> 
  <UnitCost>100.00</UnitCost> 
  <UnitPrice>130.00</UnitPrice> 
  <SupplierUUID />  <!-- Optional -->
</Cost>

PUT update

Update a cost

EXAMPLE URL

https://api.xero.com/workflowmax/3.0/cost.api/update

Example Message

<Cost>
  <UUID>e873137a-7e07-49a0-8987-130e7418ad34</UUID>
  <Description>Widget</Description> 
  <Code /> 
  <Note /> 
  <UnitCost>100.00</UnitCost> 
  <UnitPrice>130.00</UnitPrice> 
  <SupplierUUID />  <!-- Optional -->
</Cost>

The response will include the detailed information of the cost as per the GET get/[identifier] method

POST delete

Delete a cost

EXAMPLE URL

https://api.xero.com/workflowmax/3.0/cost.api/delete

Example Message

<Cost>
  <UUID>e873137a-7e07-49a0-8987-130e7418ad34</UUID>
</Cost>

POST delete all

Delete all costs

EXAMPLE URL

https://api.xero.com/workflowmax/3.0/cost.api/deleteall

Example Message

<DeleteAll />