FMSYNC

sage300.invoice

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

Add an invoice into a Batch. If the sum is negative, Bridge will create a credit invoice.
token
STRING
required
Encrypted token that contains de credential to access the accounting software. Use the online Tokenizer to generate new tokens.
batch
STRING
Name of the batch you want to add the invoice, if it doesn't exist, Bridge will create a new Batch.
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
required
Unique Invoice Number
order
STRING
Order Number
po
STRING
Purchase order number
date
STRING
required
Date of the current invoice
description
STRING
Invoice Description
termcode
STRING
Payment term code
currency
STRING
3 Digits currency code ( CAD, USD )
lines
ARRAY
required
Invoice Details.
account
STRING
required
Ledger account number
description
STRING
required
Description code
amount
NUMBER
required
Total amount of the line. Add all amounts in negative to create a credit invoice.
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}/sage300/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