API Page Guide
This is a sample API Call description page that provides guidance about formatting content. This applies only to pages in the multi-column format.
Emphasis
Certain items are emphasized in order to bring the readers eye to the item and also to differentiate terms. Objects and parameters are identified by highlighting them in a specific manner. Values (or the names of values) that form part of a name/value (or parameter/value) pair are emphasized in a manner different than that for the associated object or parameter. In a table or bullet list, the need for this is not always obvious, however this becomes a critical comprehensibility issue in paragraph text.
Version: v2 2016-06-22
Endpoint
https://wepayaip.com/foo
Tables
State Table
State One | Lorem ipsum dolor sit amet, consectetur adipiscing elit. |
State Two | Proin eleifend eleifend ipsum, tristique tristique tortor ornare eget. |
State Three | ellentesque faucibus auctor lorem, non hendrerit tellus imperdiet at. |
Argument and Response Tables
Response | Type | Description |
account_id | Integer (64 bits) | The unique ID of the account. |
name | String (255 chars) | The name of the account. |
state | String (255 chars) | The state of the account.
Possible values:
|
disabled_reasons | Array | Array of strings explaining all reasons for why an account was disabled. It will be empty if the account is enabled. Possible values are:
|
supported_card_types | Array | Array of supported card type strings for this account.
Possible card types are:
|
</tbody>
</table>
Example
{
"parameter1": "something here",
"parameter2": 123234,
"parameterSrruct": {
"fieldOne": "foo",
"fieldTwo": "bar",
"numbers": 123345
}
}
Reusable Code Block Example: Part 1
This section illustrates how to place a duplicate json block using a single source.
Steps to create a reusable JSON code block:
- Create the code block in the usual manner using the triple-tic markup and specify json as the identifier.
- Enclose the entire codeblock and triple-tic text in a uniquely named capture tag .
- In the include module at the bottom of the section, reference the uniquely named capture (e.g. right=foo). Do this in both the first occurance, and any subsequent occurance of the code block. The following two sections are an illustration of this technique.
Arguments
Parameter | Required | Type | Description |
first_name | Yes | String (255 chars) | The user's first name |
middle_init | No | String (1 char) | User's middle initial |
last_name | Yes | String (255 chars) | The user's last name. |
Example
{
"first_name": "Harry",
"middle_init": "J",
"last_name": "Potter"
}
Response
Response | Type | Description |
magic_word | String (255 chars) | The user's magic word. |
Example
{
"magic_word": "hogwarts"
}
Reusable Code Block Example: Part 2
This call gets Harry’s info. It’s response uses the captured code block from Part 1. Use the value returned in magic_word
the call above.
Parameter | Required | Type | Description |
magic_word | Yes | String (255 chars) | The magic word to make this happen. |
Example
{
"magic_word": "hogwarts"
}
Response
Response | Type | Description |
first_name | String (255 chars) | The user's first namme. |
middle_init | String (1& chars) | The user's middle initial. |
last_name | String (255 chars) | The user's last name. |
Example
{
"first_name": "Harry",
"middle_init": "J",
"last_name": "Potter"
}
Response | Type | Description |
delivery_type | String |
Delivery type for checkout.
Possible values:
|
Response | Type | Description |
delivery_type | String |
Delivery type for checkout.
Possible values: |