Skip to content

Payees

Store counterparties and merchant-like names once, then reference them from many transactions. Upsert works well for imported contacts or merchant registries.

`POST` and `PATCH` requests require an Idempotency-Key header. Responses return an X-Request-Id header plus X-RateLimit-* headers, and errors follow application/problem+json.

GET /v1/payees

List payees

Example

curl -X GET "https://api.duitmyself.app/v1/payees" \
  -H "Authorization: Bearer key_..." \

Response schema · PayeeListResponse

{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Payee"
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "hasMore": {
      "type": "boolean"
    }
  },
  "required": [
    "data",
    "nextCursor",
    "hasMore"
  ]
}
POST /v1/payees

Create a payee

Example

curl -X POST "https://api.duitmyself.app/v1/payees" \
  -H "Authorization: Bearer key_..." \
  -H "Idempotency-Key: demo-post" \
  -H "Content-Type: application/json" \
  -d '"PayeeCreate"'

Request schema · PayeeCreate

{
  "$ref": "#/definitions/PayeeCreate",
  "definitions": {
    "PayeeCreate": {
      "type": "object",
      "properties": {
        "externalId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "categoryId": {
          "type": "string",
          "nullable": true
        },
        "isMerchant": {
          "type": "boolean"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
  }
}

Response schema · PayeeResponse

{
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/Payee"
    }
  },
  "required": [
    "data"
  ]
}
GET /v1/payees/{payeeId}

Get a payee

Parameters

  • payeeId in path

Example

curl -X GET "https://api.duitmyself.app/v1/payees/{payeeId}" \
  -H "Authorization: Bearer key_..." \

Response schema · PayeeResponse

{
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/Payee"
    }
  },
  "required": [
    "data"
  ]
}
PATCH /v1/payees/{payeeId}

Update a payee

Parameters

  • payeeId in path

Example

curl -X PATCH "https://api.duitmyself.app/v1/payees/{payeeId}" \
  -H "Authorization: Bearer key_..." \
  -H "Idempotency-Key: demo-patch" \
  -H "Content-Type: application/json" \
  -d '"PayeeUpdate"'

Request schema · PayeeUpdate

{
  "$ref": "#/definitions/PayeeUpdate",
  "definitions": {
    "PayeeUpdate": {
      "type": "object",
      "properties": {
        "externalId": {
          "type": "string",
          "nullable": true
        },
        "name": {
          "type": "string"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "categoryId": {
          "type": "string",
          "nullable": true
        },
        "isMerchant": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  }
}

Response schema · PayeeResponse

{
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/Payee"
    }
  },
  "required": [
    "data"
  ]
}
POST /v1/payees/upsert

Create or update a payee by external ID

Example

curl -X POST "https://api.duitmyself.app/v1/payees/upsert" \
  -H "Authorization: Bearer key_..." \
  -H "Idempotency-Key: demo-post" \
  -H "Content-Type: application/json" \
  -d '"PayeeUpsert"'

Request schema · PayeeUpsert

{
  "$ref": "#/definitions/PayeeUpsert",
  "definitions": {
    "PayeeUpsert": {
      "type": "object",
      "properties": {
        "externalId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "categoryId": {
          "type": "string",
          "nullable": true
        },
        "isMerchant": {
          "type": "boolean"
        }
      },
      "required": [
        "externalId",
        "name"
      ],
      "additionalProperties": false
    }
  }
}

Response schema · PayeeUpsertResponse

{
  "type": "object",
  "properties": {
    "operation": {
      "type": "string",
      "enum": [
        "created",
        "updated"
      ]
    },
    "data": {
      "$ref": "#/components/schemas/Payee"
    }
  },
  "required": [
    "operation",
    "data"
  ]
}