FMSYNC

sage50ca.invoice

Schema : https://api.fmsync.net/apiref/schema/sage50ca/invoice
Namespace : sage50ca
Method : invoice

Add/Update Sage Invoices.
token
STRING
required
Encrypted token that contains de credential to access the accounting software. Use the online Tokenizer to generate new tokens.
code
STRING
required
The unique identifier for a client, Bridge will use all informations for this client to create the invoice (Address, Terms, GL etc).
invoice
STRING
Existing Invoice Number that you need to modify
date
STRING
required
Date of the current invoice
reference
STRING
Invoice Reference
comment
STRING
Invoice comments
ship
ARRAY
Shipping Informations
date
STRING
required
Shipping date
address
ARRAY
required
Shipping address
lines
ARRAY
Invoice Details.
product
STRING
Product Code of the line, need to be a valid product code from Acomba Inventory.
description
STRING
required
Product Code of the line, need to be a valid product code from Acomba Inventory.
quantity
NUMBER
required
Quantity of the line. Put 0 if you need a description line only.
price
NUMBER
required
Unit Price of the line. Put 0 if you need a description line only.
amount
NUMBER
required
Total amount of the line. If less than Price*Quantity, Sage will add a discount to the line. Put 0 if you need a description line only.
taxcode
STRING
required
Tax code for this line.
return
OBJECT
Return informations to your application
table
STRING
required
Table/Layout where your informations will be returned
record
OBJECT
required
Record that need to be updated
key
STRING
required
Primary Key Name
value
STRING
required
Primary Key Value
fninvoicenumber
STRING
required
Field name of Invoice Number for the created invoice.
fnprefix
STRING
Field name of the Prefix that should be attached to your Invoice number.
syslog
OBJECT
Status returned to your system table
table
STRING
required
Name of your system table
record
OBJECT
required
Record that need to be updated
fnstatus
STRING
required
Field Name of the status column
fntaskid
STRING
Field Name of the taskid column
fnmessage
STRING
Field Name of the message column

Request
[POST] curl https://api.fmsync.net/v2/{sourcekey}/sage50ca/invoice
-d task={
   "token":"eyJjaWUiOiJDOlxcVXNlcnNcXFB1YmxpY1xcRG9jdW1lbnRzXFxTaW1wbHkgQWNjb3VudGluZ1xcMjAxOFxcU2FtZGF0YVxcRW50ZXJwcmlzZVxcVW5pdmVyc2wuU0FJIiwidXNlciI6ImZtc3luYyIsInBhc3MiOiJmbXN5bmMifQ==",
   "code":"Askew Shopping Centre",
   "date":"Mar 31,
    2015",
   "reference":"This my Reference",
   "comment":"This is my comment",
   "lines":[{
      "product":"C1020",
      "description":"Trump's Toilet paper",
      "quantity":1,
      "price":10,
      "amount":10,
      "taxcode":"GP"
   },
   {
      "product":"D1020",
      "description":"T-Shirt",
      "quantity":2,
      "price":10,
      "amount":20,
      "taxcode":"GP"
   }]
}
Return
-d data={
   "success":true,
   "taskid":"96fc4830f56bee198be6aa8c91a59450cfa4dc74",
   "data":{
      "noinvoice":"10082",
      "prefix":"CA"
   },
   "context":"acomba.invoice",
   "source":{
      "type":"odbc",
      "sent":true,
      "message":null
   },
   "syslog":{
      "type":"odbc",
      "sent":true,
      "message":null
   }
}

Copyright © Création Logicom 2025