api-docs v5.116.0

API Docs

Table of contents


Action_Code

Credit - Delete

Back to top

Delete specific credit action code

DELETE /action-codes/:code

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/action-codes/<action-code>" \
  -X DELETE \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
code string
createdAt number
createdBy string
template string/boolean

an action code template if true, else template used

parent string
organization string
global boolean

can be used for interbranch transactions

usedAt number

timestamp

usedBy string

patient/account uid who used this

printedAt number

timestamp

printedBy string

account uid

givenAt number

timestamp

givenBy string

account uid

givenTo string

account uid

type string Allowed values: credit
name string
used number
amount number
limitType string
limit string
priceCurrency string
price number
reusable boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "code": "action-code-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid",
  "type": "credit"
}

Credit - Find

Back to top

Get list of credit action codes

GET /action-codes

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/action-codes?type=credit" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
actionCodes object[]

array of actionCode

actionCodes.code string
actionCodes.createdAt number
actionCodes.createdBy string
actionCodes.template string/boolean

an action code template if true, else template used

actionCodes.parent string
actionCodes.organization string
actionCodes.global boolean

can be used for interbranch transactions

actionCodes.usedAt number

timestamp

actionCodes.usedBy string

patient/account uid who used this

actionCodes.printedAt number

timestamp

actionCodes.printedBy string

account uid

actionCodes.givenAt number

timestamp

actionCodes.givenBy string

account uid

actionCodes.givenTo string

account uid

actionCode.type string Allowed values: credit
actionCode.name string
actionCode.used number
actionCode.amount number
actionCode.limitType string
actionCode.limit string
actionCode.priceCurrency string
actionCode.price number
actionCode.reusable boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
[
  {
    "code": "action-code-1",
    "createdAt": 1564661697125,
    "createdBy": "some-uid",
    "type": "credit"
  },
  {
    "code": "action-code-2",
    "createdAt": 1564661697125,
    "createdBy": "some-uid",
    "type": "credit"
  }
]

Credit - Get

Back to top

Get specific credit action code

GET /action-codes/:code

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/action-codes/<action-code>" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
code string
createdAt number
createdBy string
template string/boolean

an action code template if true, else template used

parent string
organization string
global boolean

can be used for interbranch transactions

usedAt number

timestamp

usedBy string

patient/account uid who used this

printedAt number

timestamp

printedBy string

account uid

givenAt number

timestamp

givenBy string

account uid

givenTo string

account uid

type string Allowed values: credit
name string
used number
amount number
limitType string
limit string
priceCurrency string
price number
reusable boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "code": "action-code-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid",
  "type": "credit"
}

Credit - Patch

Back to top

Update a credit action code

PATCH /action-codes/:code

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
global boolean optional

can be used for interbranch transactions

givenTo string optional
givenToType string optional
use boolean optional

operators

print boolean optional

operators

give string/boolean optional

operators

name string optional
used number optional

amount used if reusable

amount number optional
limitType string optional

required if limit has value

Allowed values: inventory-variant,service
limit string optional

inventory-variant/service id

priceCurrency string optional Default value: PHP
price number optional

if set, code is sellable

reusable boolean optional

Examples

Example usage:

curl "https://yourdomain.com/action-codes/<action-code>" \
  -X PATCH \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-api-token>" \
  -d '{
    "name": "updated name"
  }'

Parameters examples

json - Request-Example

{
  "name": "updated name"
}

Success response

Success response - Success 200

Name Type Description
code string
createdAt number
createdBy string
template string/boolean

an action code template if true, else template used

parent string
organization string
global boolean

can be used for interbranch transactions

usedAt number

timestamp

usedBy string

patient/account uid who used this

printedAt number

timestamp

printedBy string

account uid

givenAt number

timestamp

givenBy string

account uid

givenTo string

account uid

type string Allowed values: credit
name string
used number
amount number
limitType string
limit string
priceCurrency string
price number
reusable boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "code": "action-code-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid",
  "type": "credit"
}

Credit - Post

Back to top

Create a credit action code

POST /action-codes

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
organization string
global boolean optional

can be used for interbranch transactions

template string/boolean optional

an action code template if true, else template used

givenTo string optional
givenToType string optional
type string Allowed values: credit
name string optional
used number optional

amount used if reusable

amount number optional
limitType string optional

required if limit has value

Allowed values: inventory-variant,service
limit string optional

inventory-variant/service id

priceCurrency string optional Default value: PHP
price number optional

if set, code is sellable

reusable boolean optional

Examples

Example usage:

curl "https://yourdomain.com/action-codes" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-api-token>" \
  -d '{
    "type": "credit",
    "organization": "org-id"
  }'

Parameters examples

json - Request-Example

{
  "type": "credit",
  "organization": "org-id"
}

Success response

Success response - Success 200

Name Type Description
code string
createdAt number
createdBy string
template string/boolean

an action code template if true, else template used

parent string
organization string
global boolean

can be used for interbranch transactions

usedAt number

timestamp

usedBy string

patient/account uid who used this

printedAt number

timestamp

printedBy string

account uid

givenAt number

timestamp

givenBy string

account uid

givenTo string

account uid

type string Allowed values: credit
name string
used number
amount number
limitType string
limit string
priceCurrency string
price number
reusable boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "code": "action-code-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid",
  "type": "credit"
}

Discount - Delete

Back to top

Delete specific discount action code

DELETE /action-codes/:code

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/action-codes/<action-code>" \
  -X DELETE \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
code string
createdAt number
createdBy string
template string/boolean

an action code template if true, else template used

parent string
organization string
global boolean

can be used for interbranch transactions

usedAt number

timestamp

usedBy string

patient/account uid who used this

printedAt number

timestamp

printedBy string

account uid

givenAt number

timestamp

givenBy string

account uid

givenTo string

account uid

type string Allowed values: discount
name string
application string
applicationSubtype string
applicationRefs string[]
percentage number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "code": "action-code-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid",
  "type": "discount"
}

Discount - Find

Back to top

Get list of discount action codes

GET /action-codes

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/action-codes?type=discount" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
actionCodes object[]

array of actionCode

actionCodes.code string
actionCodes.createdAt number
actionCodes.createdBy string
actionCodes.template string/boolean

an action code template if true, else template used

actionCodes.parent string
actionCodes.organization string
actionCodes.global boolean

can be used for interbranch transactions

actionCodes.usedAt number

timestamp

actionCodes.usedBy string

patient/account uid who used this

actionCodes.printedAt number

timestamp

actionCodes.printedBy string

account uid

actionCodes.givenAt number

timestamp

actionCodes.givenBy string

account uid

actionCodes.givenTo string

account uid

actionCode.type string Allowed values: discount
actionCode.name string
actionCode.application string
actionCode.applicationSubtype string
actionCode.applicationRefs string[]
actionCode.percentage number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
[
  {
    "code": "action-code-1",
    "createdAt": 1564661697125,
    "createdBy": "some-uid",
    "type": "discount"
  },
  {
    "code": "action-code-2",
    "createdAt": 1564661697125,
    "createdBy": "some-uid",
    "type": "discount"
  }
]

Discount - Get

Back to top

Get specific discount action code

GET /action-codes/:code

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/action-codes/<action-code>" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
code string
createdAt number
createdBy string
template string/boolean

an action code template if true, else template used

parent string
organization string
global boolean

can be used for interbranch transactions

usedAt number

timestamp

usedBy string

patient/account uid who used this

printedAt number

timestamp

printedBy string

account uid

givenAt number

timestamp

givenBy string

account uid

givenTo string

account uid

type string Allowed values: discount
name string
application string
applicationSubtype string
applicationRefs string[]
percentage number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "code": "action-code-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid",
  "type": "discount"
}

Discount - Patch

Back to top

Update a discount action code

PATCH /action-codes/:code

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
global boolean optional

can be used for interbranch transactions

givenTo string optional
givenToType string optional
use boolean optional

operators

print boolean optional

operators

give string/boolean optional

operators

name string optional

discount name

application string

where the discount is applicable

Allowed values: billing-item,billing-invoice
applicationSubtype string optional

where the discount is applicable

Allowed values: inventory-variant,service
applicationRefs string[] optional

where the discount is applicable

percentage number optional

discount percentage

Examples

Example usage:

curl "https://yourdomain.com/action-codes/<action-code>" \
  -X PATCH \
  -H "Content-Type: application/json"
  -H "Authorization: Bearer <your-api-token>"
  -d '{
    "name": "updated name"
  }'

Parameters examples

json - Request-Example

{
  "name": "updated name"
}

Success response

Success response - Success 200

Name Type Description
code string
createdAt number
createdBy string
template string/boolean

an action code template if true, else template used

parent string
organization string
global boolean

can be used for interbranch transactions

usedAt number

timestamp

usedBy string

patient/account uid who used this

printedAt number

timestamp

printedBy string

account uid

givenAt number

timestamp

givenBy string

account uid

givenTo string

account uid

type string Allowed values: discount
name string
application string
applicationSubtype string
applicationRefs string[]
percentage number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "code": "action-code-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid",
  "type": "discount"
}

Discount - Post

Back to top

Create a discount action code

POST /action-codes

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
organization string
global boolean optional

can be used for interbranch transactions

template string/boolean optional

an action code template if true, else template used

givenTo string optional
givenToType string optional
type string Allowed values: discount
name string optional

discount name

application string

where the discount is applicable

Allowed values: billing-item,billing-invoice
applicationSubtype string optional

where the discount is applicable

Allowed values: inventory-variant,service
applicationRefs string[] optional

where the discount is applicable

percentage number optional

discount percentage

Examples

Example usage:

curl "https://yourdomain.com/action-codes" \
  -X POST \
  -H "Content-Type: application/json"
  -H "Authorization: Bearer <your-api-token>"
  -d '{
    "type": "discount",
    "organization": "org-id"
  }'

Parameters examples

json - Request-Example

{
  "type": "discount",
  "organization": "org-id"
}

Success response

Success response - Success 200

Name Type Description
code string
createdAt number
createdBy string
template string/boolean

an action code template if true, else template used

parent string
organization string
global boolean

can be used for interbranch transactions

usedAt number

timestamp

usedBy string

patient/account uid who used this

printedAt number

timestamp

printedBy string

account uid

givenAt number

timestamp

givenBy string

account uid

givenTo string

account uid

type string Allowed values: discount
name string
application string
applicationSubtype string
applicationRefs string[]
percentage number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "code": "action-code-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid",
  "type": "discount"
}

results matching ""

    No results matching ""