API Documentation

API documentation template

Example: [API documentation template](#/document/399/en?instanceId=1)

Title

<Information about the API call. Use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <URL Structure (path only)>

  • Method:

    <Request type>

    GET | POST | DELETE | PUT

  • URL Parameters

    <If URL parameters exist, specify them in accordance with the name mentioned in URL section. Seoerate into optional/required and document data constraints.>

    Required:

    id=[integer]

    Optional:

    photo_id=[alphanumeric]

  • Data/Query Params

    <Body payload for post requests, query parameters. Apply rules from URL params.>

  • Success Response:

    <What should the status code be on success and is there any returned data? This is useful when people need to to know what their callbacks should expect!>

    • Code: 200

      Content: { id : 12 }
  • Error Response:

    <Endpoints may fail (unauthorized access, wrongful parameters etc). All of those should be listed. This might seem repetitive, but it helps prevent assumptions from being made where they should be.>

    • Code: 401 UNAUTHORIZED

      Content: { error : "Log in" }

    OR

    • Code: 422 UNPROCESSABLE ENTRY

      Content: { error : "Email Invalid" }
  • Sample Call:

    <Just a sample call to your endpoint in a runnable format ($.ajax call, curl request,…). Makes life easier and predictable.>

  • Notes:

    <Document uncertainties, commentary, discussion etc.>

Contact sales