Skip to content

createState

Request

Bodyapplication/jsonrequired
countryinteger, (int32)required

Country ID.

Default:""
Example:1
codestring, [ 0 .. 20 ] charactersrequired

State code.

Default:""
Example:"28"
agencyinteger, (int32)

Agency ID.

Default:""
descriptionstring, [ 0 .. 100 ] charactersrequired

State description.

Default:""
Example:"Madrid"
prefixstring, [ 0 .. 5 ] characters

State prefix.

Default:""
Example:"M"
accountinteger, (int32)

Chart account ID.

Default:""
intrastatCodestring, [ 0 .. 20 ] characters

Intrastat code for the state.

Default:""
Example:"28"
targetinteger

Target value for the state.

Default:""
isoCodestring, [ 0 .. 5 ] characters

ISO state code.

Default:""
Example:"ES-M"
cycstring, [ 0 .. 5 ] characters

CYC code.

Default:""
Example:"28"
POST
/api/v1/state
curl -i -X POST \
  https://api.prana.software/api/v1/state \
  -H 'Content-Type: application/json' \
  -d '{
    "country": 1,
    "code": "28",
    "agency": "",
    "description": "Madrid",
    "prefix": "M",
    "account": "",
    "intrastatCode": "28",
    "target": "",
    "isoCode": "ES-M",
    "cyc": "28"
  }'

Responses

OK

Bodyapplication/json
idinteger, (int32)required

Unique identifier of the object

Default:""
countryobject(ApiCountryListReadDto)required

Associated country information.

Default:""
codestring, non-emptyrequired

State code.

Default:""
Example:"28"
agencyobject(ApiAgencyListReadDto)

Associated agency information.

Default:""
descriptionstring

State description.

Default:""
Example:"Madrid"
prefixstring

State prefix.

Default:""
Example:"M"
accountobject(ApiChartAccountListReadDto)

Associated chart account information.

Default:""
intrastatCodestring

Intrastat code for the state.

Default:""
Example:"28"
targetinteger

Target value for the state.

Default:""
isoCodestring, [ 0 .. 5 ] characters

ISO state code.

Default:""
Example:"ES-M"
cycstring

CYC code.

Default:""
Example:"28"
Response
{ "id": "", "country": null, "code": "28", "agency": { "id": "", "code": "AG001", "name": "Fast Transport Agency" }, "description": "Madrid", "prefix": "M", "account": { "id": "", "code": "1000", "description": "Cash account", "cif": "B12345678", "active": true, "color": "#FF5733", "parentCode": "100", "parentDescription": "Assets" }, "intrastatCode": "28", "target": "", "isoCode": "ES-M", "cyc": "28" }