WebService module Comptabilité (V1.4)

Les API pour le module compta

3 minutes de lecture
  1. Generating account entries
  2. Validating draft entries
  3. Reading account processes
  4. Reading account entries

Generating account entries

This function generates account entries in draft mode (without process number), or already validated (and affecting a process number). When calling in draft mode, the web service will return warnings when generated entries contain unbalanced data (debit different from credit) or entries with an unknown account. When this occurs while calling in validated mode, the generation will be cancelled and errors will be returned instead.

Web service name :

http://clic-till.com/wsRest/wsServerAccounting/generate

Fields

NameTypeMandatoryComment
entry_typeStringNoGeneration mode. Value must  be “draft” or “validated” (default = “draft”) 
date_startStringNoStart date of the processed period (default = current date)
date_endStringNoEnd date of the processed period (default = current date)
shops String listNoList of shop codes to process (default = all shops)
accountsString listList of accounts to process.  Values must be “receipt”, “bank”, or “cashdesk” (default = all accounts)

Data

{

entry_type”: “validated”,

“date_start”: “2017-11-20”,

“date_end”: “2017-12-06”,

“shops”: [“LYO”, “MAR”],

“accounts”: [“receipt”, “cashdesk”]

}

Response

{

“response”: {

“info”: {

“status”: “success”,

“entries_generated”: {

“receipt”: “26”,

“vat”: “26”,

“discount”: “0”,

“tender”: “8”,

“receipt_difference”: “0”,

“cashdesk”: “2”,

“difference”: “0”

},

“unbalanced_entries”: [],

“unknown_account_numbers”: [],

“webService”: “ACC”

}

}

}

Validating draft entries

After generating account entries in draft mode, they can be validated by calling this function. A process number will be affected to all of the existing draft entries.

http://clic-till.com/wsRest/wsServerAccounting/validate_draft

This function expects no parameters.

Response

{

“response”: {

“info”: {

“status”: “success”,

“webService”: “ACC”

}

}

}

Reading account processes

This web service allows you to read account processes.

Web service name:

http://clic-till.com/wsRest/wsServerAccounting/get_account_process

Fields

NameTypeMandatoryComment
shops  String listNoList of shop codes to select  (default = all)
process_numbersString listNoList of process numbers to select (default = all)
date_startStringNoStart date of the selected period (default = none)
date_endStringNoEnd date of the selected period (default = none)

Data

{

“shops”: [“LYO”, “MAR”],

“process_numbers”: [“0011”, “0231”],

“date_start”: “2017-12-01”,

“date_end”: “2017-12-06”

}

Response

{

“response”: {

“info”: {

“status”: “success”,

“data”: [

{

“process_number”: “0011”,

“id_shop”: “1”,

“code”: “LYO”,

“created_date”: “2017-12-06 12:34:12”,

“start_date”: “2017-11-20”,

“end_date”: “2017-12-06”

},

{

“process_number”: “0231”,

“id_shop”: “23”,

“code”: “MAR”,

“created_date”: “2017-12-06 12:34:12”,

“start_date”: “2017-11-20”,

“end_date”: “2017-12-06”

}

],

“webService”: “ACC”

}

}

}

Reading account entries

This web service allows you to read account entries.

Web service name:

http://clic-till.com/wsRest/wsServerAccounting/get_account_entries

Fields

NameTypeMandatoryComment
shops  String listNoList of shop codes to select (default = all)
acclogsString listNoList of accounting log codes to select (default = all)
process_numbersString listNoList of process numbers to select (default = all)
date_startStringNoStart date of the selected period (default = none)
date_endStringNoEnd date of the selected period (default = none)
mergingStringNoMerging type of response data.  Value must be “item”, “day”, or “period”. (default = “item”)

Data

{

“shops”: [“LYO”, “MAR”],

“process_numbers”: [“0011”, “0231”],

“date_start”: “2017-12-01”,

“date_end”: “2017-12-06”

}

Response

Avez-vous trouvé votre réponse?