Village Product and Developer Docs
  • 📘Welcome to Village Labs
    • Welcome to Village Labs
    • Self Service Onboarding
    • Help Pages
      • Adding and Deleting Users
      • Mapping Users to Source tool IDs
      • How to follow or unfollow other users
      • Configuring & Removing Daily Slack Notification Whitelist
      • Changing the Reporting Lines & Teams
      • Following Custom Reports
      • Google Drive Privacy: When will my documents appear in Village Reports?
    • Custom Reports
      • Creating Team Reports
      • Creating Custom Reports & Custom Prompt Library
    • Meetings
      • Connecting your Calendar
      • Configuring your Meetings
      • Meeting Summary Reports
    • Village Assistant
      • Github PR Review Tool
    • Security & Compliance
    • Data Privacy & Permissions
  • 🔌Data Connections
    • Airtable
    • Ashby
    • Clickup
      • Finding ClickUp User IDs
    • Figma
    • Github
      • Finding GitHub User IDs
    • Gitlab
    • Google - OAuth (Recommended)
    • Google - Manual Connection
    • Hubspot
    • Jira
      • Finding Jira User IDs
    • Confluence
      • Finding Confluence / Jira User IDs
    • Linear
    • Asana
    • Monday
    • Notion
    • Pipedrive
    • Slack
    • Basecamp
    • Zoom
  • 👩‍💻Legacy Developer Docs
    • Developer Quickstart
    • Village APIs: Introduction
      • Activity API
      • User Status API
      • Patch User API
      • Segments API
      • Redemption API
      • Master Award Controls
      • Connections (Referrals) APIs
      • GET APIs
    • 3rd Party Payments Integrations
    • Embedding Village Dashboards
  • 🕵️LEGACY Knowledge Base
    • Admin Quickstart
    • Referrals Support
    • The Basics of Village in 15 Minutes
    • Programs & Rules
      • Triggers
        • Activities
        • Goals
      • Conditions
        • Segment Conditions
        • Time Conditions
        • Max Budget Conditions
        • Conditional Multipliers
    • Awards
      • Monetary (Cash) Awards
      • Non-Monetary Awards
        • Funding
          • In-depth use cases for funding pools
      • Badges & Statuses
      • Award Expiration
    • Segments
      • Segmentation Use Cases
    • Rule Evaluation Logic Deep-dive
    • The Village Dashboards
      • Admin Account Creation
      • User Access Management
      • Network Settings
      • User Dashboard
    • BigQuery
    • Managing Payment Integrations
    • Referrals (Connections)
      • Pre-populating Users' Unique Referral Codes In Signup Flows & Forms
  • No and Low Code Solutions
    • No and Low Code Solutions
      • No & Low Code Solutions
  • Feedback
    • Village Docs Feedback Form
    • Feature Requests
    • Talk to our Team
Powered by GitBook
On this page
  • Prerequisites
  • Explore with our Postman Collection
  • Authentication
  • API URL
  • Headers
  • Metadata
  • POST Request Response & Errors
  • Response status codes
  • API Results Table
  • GET Results API

Was this helpful?

  1. Legacy Developer Docs

Village APIs: Introduction

Common information shared across POST APIs

PreviousDeveloper QuickstartNextActivity API

Last updated 1 year ago

Was this helpful?

Jump to:

Prerequisites

  1. An Admin Account ()

  2. A Network ()

  3. An API Key ()

Explore with our Postman Collection

Explore the . Postman allows you to see the Village API in action, copy/paste code snippets in multiple languages, and test different integrations live. We highly recommend using this resource while integrating with Village.

Authentication

To use this API, you must generate an API Key from Village. The API key should be supplied in an Authorization header with the token, preceded by Bearer:

Authorization: Bearer API_KEY

API URL

The base URL for all API endpoints is:

https://api-ledger.villagelabs.net/

Headers

Header
Value

Content-Type

application/json

Accept

application/json

Metadata

For Village’s API, many of our objects also have an optional metadata object that can be updated. Metadata can be used to store additional structured information about an object. For instance, you can store a transaction’s unique identifier from your system on an Activity object in our API. By default, metadata is not used by our API or the Village System to execute Rule logic, but it can be queried through our analytics tools and in our Search API (coming soon). Note that users won't see metadata unless you choose to display it to them.

Metadata also usually includes a description parameter, which can be used to add a human-readable description to an object. E.g., "2 shirts for test@example.com."

We strongly advise you not to store any sensitive information such as bank account numbers or card details in the metadata.

POST Request Response & Errors

For POST requests, the response body will contain a JSON object representing whether or not the POST request was successfully added to Village's asynchronous processing queue.

Response status codes

Code
Description

201

Success: request is queued for processing.

400

Bad request: malformed request syntax or invalid request message framing.

401

Not unauthorized.

404

Not found

500

Internal server error.

Read Me! On Asynchronous Responses:

To view downstream processing errors and other information related to your POST requests, use the API Results Table in the Admin Dashboard or the GET Results API.

API Results Table

To access the frontend view of API request results table view, visit Network Home -> API Keys & Documentation.

For each POST Request, the following information will be available in the API Results Table:

Field
Description

Status Symbol

Symbol indicating general success of the original request. (Green=Success, Red=Error.)

HTTP Status Code

The HTTP equivalent of the response status code associated with the original request.

Error Message

If there was a processing error, the description of the error will be listed here.

Request ID

The UUID associated with the original request response.

API Key Name

The common name of the API key.

Number of Messages Sent

Messages sent to the Village ledger associated with the original request.

Names of Messages Sent

List of names sent to the Village ledger associated with the original request.

Request Data

A copy of the data sent to Village in the original request.

GET Results API

Querying the API Results

If you prefer to use an API query instead of viewing the processing results via the Admin Dashboard, you may also make a GET request from the Results API to retrieve the processing status of a POST API Request.

  • The GET Results API is synchronous and responses are immediate.

URL

  • Replace 'YOUR_NETWORK_ID' with your actual Network ID

  • Replace 'ID' with the 'request_id' you received in the original POST response

Response Codes

Code
Description

201

Success.

400

Bad request: malformed request syntax or invalid request message framing.

401

Not unauthorized.

404

The original API request has not completed processing

500

Internal server error.

Response Model

Field
Description

HTTP Status Code

The HTTP equivalent of the response status code associated with the original request.

Error Message

If there was a processing error, the description of the error will be listed here.

Request ID

The UUID associated with the original request response.

API Key Name

The common name of the API key.

Number of Messages Sent

Messages sent to the Village ledger associated with the original request.

Names of Messages Sent

List of message names sent to the Village ledger associated with the original request.

Request Data

A copy of the data sent to Village in the original request.

Due to our system's asynchronous processing architecture and cryptographically verifiable ledger, our POST APIs utilize an and a to display errors and other information related to API requests.

The real-time response code you do receive from a Village POST API request represents whether or not your request has been added to our asynchronous processing queue, not whether the POST request and any downstream were fully processed without errors.

The same and are required as with POST requests

GET

👩‍💻
Programs & Rules
https://api-ledger.villagelabs.net/networks/YOUR_NETWORK_ID/results/ID
Is this page helpful? Give us feedback on our docs ->
API Results Table
GET Results API
authentication
headers
Postman Collection ->
Developer Quickstart ->
Village API collection with Postman
Responses & Errors ->
Authentication ->
Headers ->
Metadata ->
Invite Users & Admins ->
Create a Network ->
Visit API Keys & Documentation