20.03.16 Payment Methods

The PaymentMethods Object

Object PropertyRequiredObject TypeDescriptionMax Character Length
PaymentMethodYesStringPayment Method of PaymentMethod50
AccountPaymentMethodIdNoIntegerId of PaymentMethod10
IsDisabledNoBooleanDisabled Status of PaymentMethod1

List All PaymentMethods

Returns a list of your all PaymentMethods in your UNItekTIME account.
GET /API/PaymentMethods

Example Request

curl "https://demo.unitektime.com/api/PaymentMethods" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "Content-Type: application/json" \
      -H "User-Agent: MyApp (yourname@example.com)"

Example Response

[
    {
        "AccountPaymentMethodId": 0001,
        "PaymentMethod": "American Express",
        "IsDisabled": "No"
    },
    {
        "AccountPaymentMethodId": 0002,
        "PaymentMethod": "Cash",
        "IsDisabled": "No"
    }
]

Retrieve a PaymentMethods

Retrieves the PaymentMethods with the given ID. Returns a PaymentMethods object and a 200 OK response code if a valid identifier was provided.
GET /API/PaymentMethods/{PaymentMethods_ID}

Example Request

curl "https://demo.unitektime.com/api/PaymentMethods/0002" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "Content-Type: application/json" \
      -H "User-Agent: MyApp (yourname@example.com)"

Example Response

[
   {
        "AccountPaymentMethodId": 0002,
        "PaymentMethod": "Cash",
        "IsDisabled": "No"
    }
]

Create a PaymentMethods

Creates a PaymentMethods in your UNItekTIME account and returns the Response Message.
POST /API/PaymentMethods
Object PropertyRequiredObject TypeDescriptionMax Character Length
PaymentMethodYesStringPayment Method of PaymentMethod50

Example Request

curl "https://demo.unitektime.com/api/PaymentMethods" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'PaymentMethod': 'demo'}"

Example Response

[
    {
        "id": "00001",
        "message": "Payment Method Added Successfully"
    }
]

Update a PaymentMethods

Update an PaymentMethods in your UNItekTIME account and returns the Response Message.
POST /API/PaymentMethods/{PaymentMethods_ID}

Example Request

curl "https://demo.unitektime.com/api/PaymentMethods/0001" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'PaymentMethod': 'demo'}"

Example Response

[
    {
        "id": "0001",
        "message": "Payment Method Update Successfully"
    }
]

Delete a PaymentMethods

Delete a PaymentMethods. Returns a 200 OK response code if the call succeeded.
DELETE /API/PaymentMethods/{PaymentMethods_ID}

Example Request

curl "https://demo.unitektime.com/api/PaymentMethods/0001" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X DELETE \
      -H "Content-Type: application/json"

Example Response

[
    {
        "id": "0001",
        "message": "Payment Method Deleted successfully"
    }
]