# Data Conventions

Source: https://docs.gocardless.com/docs/api-reference/data-conventions

# Data Conventions

## Dates and times

All timestamps are ISO 8601 with timezone information, for example `2014-02-27T15:05:06.123Z`.

Endpoints that accept a date (not a datetime) expect the format `YYYY-MM-DD`, for example `2014-02-27`.

## Cursor pagination

All list endpoints are ordered and paginated reverse-chronologically by default.

### Request parameters

| Parameter | Description                                                            |
| --------- | ---------------------------------------------------------------------- |
| `before`  | ID of the object immediately following the array to be returned.       |
| `after`   | ID of the object immediately preceding the array to be returned.       |
| `limit`   | Maximum number of objects to return. Default `50`, max `500`, min `1`. |

### Response metadata

Every paginated response includes a `meta.cursors` object:

| Field    | Description                                                             |
| -------- | ----------------------------------------------------------------------- |
| `before` | ID of the first resource returned.                                      |
| `after`  | ID of the last resource returned.                                       |
| `limit`  | Upper bound applied. May be less than requested if fewer objects exist. |

### Example

```http
GET https://api.gocardless.com/payments?after=ID789 HTTP/1.1

HTTP/1.1 200 OK
Content-Type: application/json

,
    
  ],
  "meta": ,
    "limit": 50
  }
}
```

> **Tip:**
> To page through all results, keep passing the `after` cursor from each response until the array is
>   empty or shorter than the requested `limit`.

## What's next

  
#### [Responses and Errors](/docs/api-reference/responses-and-errors)

HTTP response codes and how to handle each error type.

  
#### [Making Requests](/docs/api-reference/making-requests)

Authentication, headers, and how to structure every API call.