Create (POST) Unit Transaction

Use this API to create a unit transaction in the Transaction Center.

To create a unit transaction:

Execute a POST command on the endpoint {{url}}/ledger/{{TransType}}, by setting the variable TransType to UN and specifying the transaction data for that unit in the request body.

For example, here is a request submitted using cURL:

curl
  --request POST \
  --url 'https://{{url}}/ledger/UN' \
  --header 'authorization: Bearer {{oauth_token}}' \
  --header 'content-type: application/json' \
  --data '{
	"Batch": "PSA-API-UNBatch01",
	"Recurring": "Y",
	"Posted": "N",
	"Creator": "ADMIN",
	"Period": "201305",
	"EndDate": "2013-05-26T00:00:00.000",
	"Total": "0",
	"PostPeriod": "0",
	"PostSeq": "0",
	"Company": "0A",
	
	"unMaster": [
		{
		"Batch": "PSA-API-UNBatch01",
		"Unit": "00001",
		"Posted": "N",
		"Seq": "0",
		"CurrencyExchangeOverrideMethod": "N"
		}
	],
	
	"unDetail": [
		{
		"Batch": "PSA-API-UNBatch01",
		"Unit": "00001",
		"PKey": "LOCKBOX00001",
		"Seq": "1",
		"TransDate": "2013-05-26T00:00:00.000",
		"WBS1": "PROJCUBE.010",
		"WBS2": "",
		"WBS3": "",
		"TableNo": "AA_1",
		"Account": "52900",
		"Description": "Description 1",
		"Quantity": "2",
		"CurrencyExchangeOverrideRate": "0.0",
		"Employee": "",
		"EmployeeCompany": ""
		},
		{
		"Batch": "PSA-API-UNBatch01",
		"Unit": "00001",
		"PKey": "LOCKBOX00002",
		"Seq": "2",
		"TransDate": "2013-05-26T00:00:00.000",
		"WBS1": "PROJCUBE.010",
		"WBS2": "",
		"WBS3": "",
		"TableNo": "AA_2",
		"Account": "40100",
		"Description": "Description 2",
		"Quantity": "10",
		"CurrencyExchangeOverrideRate": "0.0",
		"Employee": "",
		"EmployeeCompany": ""
		}
	]
}
'

A successful POST returns the JSON representation of the newly created unit.