FormerMember

Sage 300 web api not uploading data

Posted By FormerMember

I can do GET operations, but attempts to do POST appear to have the data ( curl -d element) stripped or munged by the time they get to the Sage engine.  If I do ARInvoiceBatches, for instance, it will create an empty Batch with no batch data and no attached invoices.  If I try to create a Sales Person, it fails with validation fault.

Example:

URL

localhost/Sage300WebApi/v1.0/-/WOWGRP/AR/ARSalespersons/

CURL

-X POST

 -h Content-Type: 'application/json'

 -h Accept: 'application/json'

 --user ADMIN:ADMIN

 --d '{"SalespersonKey" : "5G"}'

RESPONSE

{  "error": {    "code": "RecordInvalid",    "message": {      "lang": "en-US",      "value": "Salesperson code cannot be blank."    }  }}