PointCheckout Branches API
API endpoints for branch management.
API endpoints for branch management.
openapi: 3.0.1
info:
title: Merchant Branches API
description: "paymennt.com provides a collection of APIs that enable you to process and manage payments. Our APIs accept and return JSON in the HTTP body, and return standard HTTP response codes. You can consume the APIs directly using\n\nyour favorite HTTP/REST library or make use of one of our SDKs.\n\n# Introduction\n\nLearn how to integrate our APIs into your application\n\n### API Basics\n\nThe paymennt.com API gives you access to pretty much all the features you can use on our dashboard and lets you extend them for use in your application. It strives to be RESTful and is organized around the main resources you would be interacting with - with a few notable exceptions.\n\n### Requests and Response\n\nBoth request body data and response data are formatted as JSON. Content type for responses will always be `application/json`. Generally, all responses will be in the following format:\n\n```js title=\"/src/components/HelloCodeTitle.js\"\n{\n \"success\": [boolean], // true indicates a successful operation\n \"elapsed\": [number], // time spent server side processing the request\n \"error\": [string], // if success is false, this will indicate the error\n \"result\": [object] // the result of the operation\n}\n```"
version: '2.0'
servers:
- url: https://api.paymennt.com/mer/v2.0/
description: paymennt.com live environment
- url: https://api.test.paymennt.com/mer/v2.0/
description: paymennt.com test environment
security:
- ApiKey: []
ApiSecret: []
tags:
- name: Branches
description: API endpoints for branch management.
paths:
/branches/{branchId}:
get:
tags:
- Branches
summary: Get branch by Id
operationId: get-branch-by-id
parameters:
- name: branchId
in: path
description: Branch Id.
required: true
schema:
type: string
responses:
'200':
description: Branch details.
content:
application/json:
schema:
$ref: '#/components/schemas/BranchResponseWrapper'
exampleSetFlag: false
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/GetBranchErrorResponse'
exampleSetFlag: false
x-sort:
sort: '10010'
/branches:
get:
tags:
- Branches
summary: Get branches
description: List all branches associated with merchant
operationId: get-branches
parameters:
- name: page
in: query
description: page number, default is 0
required: false
schema:
minimum: 0
type: number
- name: size
in: query
description: page size, default is 20
required: false
schema:
minimum: 1
type: number
responses:
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/GetListErrorResponse'
exampleSetFlag: false
'200':
description: List of all branches.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BranchResponseWrapper'
exampleSetFlag: false
x-sort:
sort: '10000'
post:
tags:
- Branches
summary: Create new branch
operationId: create-branch
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BranchRequest'
exampleSetFlag: false
required: true
responses:
'200':
description: Branch details.
content:
application/json:
schema:
$ref: '#/components/schemas/BranchResponseWrapper'
exampleSetFlag: false
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/PostBranchErrorResponse'
exampleSetFlag: false
x-sort:
sort: '10020'
/branches/{branchId}/disable:
post:
tags:
- Branches
summary: Disable branch
operationId: disable-branch
parameters:
- name: branchId
in: path
description: Branch Id.
required: true
schema:
type: string
responses:
'200':
description: Branch details.
content:
application/json:
schema:
$ref: '#/components/schemas/BranchResponseWrapper'
exampleSetFlag: false
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/GetBranchErrorResponse'
exampleSetFlag: false
x-sort:
sort: '10030'
/branches/{branchId}/enable:
post:
tags:
- Branches
summary: Enable branch
operationId: enable-branch
parameters:
- name: branchId
in: path
description: Branch Id.
required: true
schema:
type: string
responses:
'200':
description: Branch details.
content:
application/json:
schema:
$ref: '#/components/schemas/BranchResponseWrapper'
exampleSetFlag: false
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/GetBranchErrorResponse'
exampleSetFlag: false
x-sort:
sort: '10040'
components:
schemas:
BranchResponseWrapper:
type: object
properties:
success:
type: boolean
description: Whether or not this operation completed successfully.
example: true
elapsed:
type: integer
description: Time in milliseconds elapsed at server processing this request.
format: int64
example: 12
result:
$ref: '#/components/schemas/BranchResponse'
GetListErrorResponse:
type: object
properties:
success:
type: boolean
description: Whether or not this operation completed successfully.
example: false
elapsed:
type: integer
description: Time in milliseconds elapsed at server processing this request.
format: int64
example: 3
error:
type: string
description: Error message.
example: page size parameter must be a positive integer
BranchRequest:
required:
- currency
- name
type: object
properties:
name:
type: string
description: Branch name.
example: Main branch
currency:
type: string
description: Branch currency code, ISO 4217 Currency Code (3 letter currency code).
example: Main branch
description:
type: string
description: Short description of the branch.
example: Main branch
PostBranchErrorResponse:
type: object
properties:
success:
type: boolean
description: Whether or not this operation completed successfully.
example: false
elapsed:
type: integer
description: Time in milliseconds elapsed at server processing this request.
format: int64
example: 3
error:
type: string
description: Error message.
example: A branch already exists with the same name 'Store'
BranchResponse:
type: object
properties:
id:
type: string
name:
type: string
currency:
type: string
description:
type: string
enabled:
type: boolean
description: Result Object.
GetBranchErrorResponse:
type: object
properties:
success:
type: boolean
description: Whether or not this operation completed successfully.
example: false
elapsed:
type: integer
description: Time in milliseconds elapsed at server processing this request.
format: int64
example: 3
error:
type: string
description: Error message
example: Branch not found for API merchant
securitySchemes:
ApiKey:
type: apiKey
name: X-PointCheckout-Api-Key
in: header
ApiSecret:
type: apiKey
name: X-PointCheckout-Api-Secret
in: header