Cost centre ID for AssignedTo=Stock

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
tmeier
Posts: 8
Joined: Fri Aug 15, 2025 4:47 am

Cost centre ID for AssignedTo=Stock

Post by tmeier » Fri Oct 10, 2025 4:42 am

When a PO is issued for a particular cost centre the vendorOrders API endpoint (api/v1.0/companies/0/vendorOrders/<vendorOrder>) shows the cost centre ID

Code: Select all

    "AssignedTo": {
        "ID": 34514,
        "CostCenter": {
            "ID": 119,
            "Name": "Sales Aluminium"
        },
        "Name": "102660-34514 Sales Aluminium",
        "Job": 102660,
        "Section": 30010
    },
however if the PO is issued for stock the AssignedTo object is empty; i.e.

Code: Select all

    "AssignedTo": {},
    "Stage": "Approved",
    "Status": {
        "ID": 24,
        "Name": "Purchase Orders : Sent to Supplier"
    },
However in order to create a receipt for the order (/api/v1.0/companies/{companyID}/vendorOrders/{vendorOrderID}/receipts/) we need the cost centre ID.

Is there an endpoint (similar to the catalogs endpoint) I can lookup the ID (for stock) because the code needs to default to the ID if it's not returned via the API. Along the same lines are there other cost centers that don't come through via the API in which case this becomes a challenge to auto-assign
Attachments
ExpenseCostCenter.png
ExpenseCostCenter.png (24.57 KiB) Viewed 1670 times
Last edited by tmeier on Wed Oct 22, 2025 5:30 am, edited 1 time in total.
SimproAPITeam
Posts: 831
Joined: Wed May 01, 2024 2:31 am

Re: Cost centre ID for AssignedTo=Stock

Post by SimproAPITeam » Tue Oct 14, 2025 12:52 am

Catalog is not required when assigned to stock. You can POST a receipt with an empty body if you want.

https://developer.simprogroup.com/apido ... 3510cb72d8
^ Based on your screen shot you already have this page

To my understanding if a catalogue is included it will expect a cost center but if you do not include a catalogue you should be able to post a receipt fine.

Hope this help.
Simpro API Team | Simpro Software Group
Post Reply