FMSYNC

acomba.purchase

Schema : https://api.fmsync.net/apiref/schema/acomba/purchase
Namespace : acomba
Method : purchase

Using the Invoicing module of Acomba, a printable purchase will be created for the supplier. Created purchase cannot be modified, create a new acomba.purchase task and reverse any quantities and Shipping fees.
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 supplier, Bridge will use all informations for this supplier to create the purchase (Address, Terms, GL etc).
date
STRING
required
Date of the current purchase
purchasetoclient
STRING
Client code to address the purchase
reference
STRING
Purchase Reference
description
STRING
Purchase short description
project
NUMBER
Project number associate with this purchase
taxgroup
STRING
Name of the Tax Group, if not defined, bridge will use the default tax group of the supplier
ship
OBJECT
Shipping informations
name
STRING
Name of the company where it will be shipped
contact
STRING
Contact name of the shipping address
address
STRING
Shipping address
city
STRING
Shipping City
postal
STRING
Shipping Postal/ZIP Code
country
STRING
Shipping Country Name
amount
NUMBER
Shipping Fees
lines
ARRAY
Purchase 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
Price of the line. Put 0 if you need a description line only.
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
INTEGER
required
Primary Key Value
fnpurchasenumber
STRING
required
Field name of Purchase Number for the created purchase.
fnprefix
STRING
Field name of the Prefix that should be attached to your Purchase 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}/acomba/purchase
-d task={
   "token":"1714919909",
   "code":"5593366",
   "date":"08\/01\/18",
   "reference":"This my Reference",
   "description":"This is my description",
   "taxgroup":"GST",
   "ship":{
      "name":"Miracle Company",
      "contact":"John Doe",
      "address":"123 Bonneville Street",
      "city":"Montreal",
      "postal":"J9E 4T4",
      "country":"CA",
      "amount":30.99
   },
   "lines":[{
      "product":"GiftCertificates",
      "description":"Gift Certificat",
      "quantity":1,
      "price":10
   },
   {
      "product":"WFrenchWin",
      "description":"Steel French Window and 2 Tiled Windows",
      "quantity":1.45,
      "price":375.45
   },
   {
      "description":"Descriptive line only",
      "quantity":0,
      "price":0
   }],
   "return":{
      "table":"acomba.purchase",
      "record":{
         "key":"id",
         "value":1
      },
      "fnpurchasenumber":"nopurchase",
      "fnprefix":"prefix",
      "syslog":{
         "table":"syslog",
         "record":{
            "key":"id",
            "value":1
         },
         "fntaskid":"taskid",
         "fnstatus":"status",
         "fnmessage":"message"
      }
   }
}
Return
-d data={
   "success":true,
   "message":null,
   "taskid":"20a686bf4bab9df1b0f30c85842d2b556d9898e5",
   "context":"acomba.purchase",
   "data":{
      "purchasenumber":"14657",
      "prefix":"SU"
   }
}

Copyright © Création Logicom 2025