> ## Documentation Index
> Fetch the complete documentation index at: https://docs-int.wingback.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Customer

> Retrieve customer by id. The API returns customer and the contract that the customer is currently on

export const IntRedir = () => {
  if (typeof document === "undefined") {
    return null;
  } else {
    setTimeout(() => {
      const currentUrl = new URL(window.location.href);
      if (currentUrl.hostname === 'docs-int.wingback.com') {
        currentUrl.hostname = 'docs.wingback.com';
        window.location.replace(currentUrl.toString());
      }
    }, 1);
    return <></>;
  }
};

<IntRedir />


## OpenAPI

````yaml GET /v1/c/customer/{customer_id}
openapi: 3.0.3
info:
  title: wingback-api
  description: ''
  contact:
    name: ''
  license:
    name: commercial
  version: 0.1.0
servers:
  - url: http://127.0.0.1:8080
    description: Local server
  - url: https://api.app.test.wingback.com
    description: Testing server
security: []
paths:
  /v1/c/customer/{customer_id}:
    get:
      tags:
        - customer
      summary: returns a customer by id
      operationId: get_customer
      parameters:
        - name: customer_id
          in: path
          required: true
          schema:
            type: string
          example: Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670
      responses:
        '200':
          description: Customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/outbound.customer.Customer'
      security:
        - api-key: []
        - wb_user_cookie: []
components:
  schemas:
    outbound.customer.Customer:
      type: object
      description: Customer detailed information
      required:
        - id
        - status
        - emails
        - created
        - metadata
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/core.address.Address'
          nullable: true
        contracts:
          type: array
          items:
            $ref: '#/components/schemas/outbound.contract.Summary'
          description: Contracts signed by this Customer
          nullable: true
        created:
          type: string
          description: Date created
        customer_reference:
          type: string
          description: Customer Reference. May contain a reference to an external system
          nullable: true
        emails:
          type: object
          description: Email addresses associated with this customer
          additionalProperties:
            type: string
        id:
          $ref: '#/components/schemas/Id'
        metadata:
          $ref: '#/components/schemas/CustomerMetadata'
        name:
          type: string
          description: Customer Name
          nullable: true
        notes:
          type: string
          description: Customer notes
          nullable: true
        status:
          $ref: '#/components/schemas/CustomerStatus'
        tax_details:
          allOf:
            - $ref: '#/components/schemas/CustomerTaxDetails'
          nullable: true
    core.address.Address:
      type: object
      description: Physical address. Used by both Customer and WbCustomer entities.
      required:
        - line_1
        - zip
        - city
        - country
      properties:
        city:
          type: string
          description: City name
        country:
          $ref: '#/components/schemas/Country'
        line_1:
          type: string
          description: First line of address
        line_2:
          type: string
          description: Second line of the address. Optional
          nullable: true
        state:
          type: string
          description: |-
            State, or another appropriate administrative region
            Empty string value will be treated as NULL
          nullable: true
        zip:
          type: string
          description: Zip or Postal code
    outbound.contract.Summary:
      type: object
      description: Contract Summary
      required:
        - id
        - plan
        - plan_internal_name
        - plan_id
        - customer
        - customer_id
        - status
        - cycle
        - cycle_start_offset
        - strategy
        - currency
        - amount
        - billing_information
        - configuration
        - free_cycles
        - cost_estimates
      properties:
        activation:
          type: string
          format: date-time
          description: Contract Activation Date
          nullable: true
        amount:
          type: string
          description: Contract estimated price
          deprecated: true
        billing_information:
          $ref: '#/components/schemas/BillingInformation'
        configuration:
          $ref: '#/components/schemas/outbound.contract.ContractConfiguration'
        cost_estimates:
          $ref: '#/components/schemas/PriceEstimate'
        created:
          type: string
          format: date-time
          description: Date os signing
          nullable: true
        currency:
          $ref: '#/components/schemas/Currency'
        customer:
          type: string
          description: Customer Name
        customer_id:
          $ref: '#/components/schemas/Id'
        cycle:
          $ref: '#/components/schemas/Cycle'
        cycle_start_offset:
          type: integer
          description: |-
            The number of days from the cycle's natural start (i.e. the
            first day of the week/month/quarter/year) to the start of the
            cycles
          minimum: 0
        expiration:
          type: string
          format: date-time
          description: Contract Expiration Date
          nullable: true
        free_cycles:
          type: integer
          description: The number of free cycles
          minimum: 0
        free_trial_end:
          type: string
          format: date-time
          description: Date of the end of the free trial, if any
          nullable: true
        id:
          $ref: '#/components/schemas/Id'
        next_cycle_start:
          type: string
          format: date-time
          description: |-
            End date of the current cycle
            (if the contract is active)
          nullable: true
        plan:
          type: string
          description: Plan Name
        plan_external_name:
          type: string
          description: External Plan name
          nullable: true
        plan_id:
          $ref: '#/components/schemas/Id'
        plan_internal_name:
          type: string
          description: Internal Plan name
        pricing_id:
          allOf:
            - $ref: '#/components/schemas/Id'
          nullable: true
        status:
          $ref: '#/components/schemas/ContractStatus'
        strategy:
          $ref: '#/components/schemas/Strategy'
    Id:
      type: string
      description: >-
        Unique identifier of an object. Consists of object class prefix and a
        UUID
      example: Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670
    CustomerMetadata:
      type: object
      description: Key-value customer metadata with string values.
      additionalProperties:
        type: string
    CustomerStatus:
      type: string
      description: >-
        Status of the Customer

        * Active - customer is active

        * Inactive - Customer account was deactivated

        * Temporary - Customer was created, but registration process was not
        completed
      enum:
        - active
        - inactive
        - temporary
    CustomerTaxDetails:
      type: object
      description: Extra information that impacts customer's taxation
      properties:
        vat_id:
          type: string
          description: Customer's VAT ID
          nullable: true
    Country:
      type: string
      description: ISO 3166 2-letter Country code
    BillingInformation:
      type: object
      description: Detailed information about the current billing period
      properties:
        current_period:
          allOf:
            - $ref: '#/components/schemas/Period'
          nullable: true
        current_period_idx:
          type: integer
          format: int32
          description: Current billing period index (starting from 1, ascending)
          nullable: true
    outbound.contract.ContractConfiguration:
      type: object
      description: Additional Contract-level billing configuration
      required:
        - automatic_payment
        - due_date_policy
        - usage_period_closing_policy
        - invoice_trigger
      properties:
        automatic_payment:
          type: boolean
          description: Should invoice amount be charged automatically or not
        due_date_policy:
          $ref: '#/components/schemas/DueDatePolicy'
        invoice_trigger:
          $ref: '#/components/schemas/InvoiceTrigger'
        usage_period_closing_policy:
          $ref: '#/components/schemas/UsagePeriodClosingPolicy'
    PriceEstimate:
      type: object
      description: Price estimate
      required:
        - recurring_price
        - one_time_price
        - on_demand_price
        - custom_cycle_charges
      properties:
        custom_cycle_charges:
          $ref: '#/components/schemas/CustomCycleCharges'
        on_demand_price:
          $ref: '#/components/schemas/Estimate'
        one_time_price:
          $ref: '#/components/schemas/Estimate'
        recurring_price:
          $ref: '#/components/schemas/Estimate'
    Currency:
      type: string
      description: |-
        A supported currency

        The format for parsing and reading is the lowercased
        ISO 4217 currency code (e.g. "usd")
      enum:
        - usd
        - eur
        - gbp
        - brl
        - ars
    Cycle:
      type: string
      description: |-
        Enum that lists supported payment cycles for contracts:
        * Once - one-time payment
        * Constant - one-time payment for the duration of the contract
        * Week - contract is paid weekly
        * Month - contract is paid monthly
        * Quarter - contract is paid every quarter
        * Year - contract is paid yearly
      enum:
        - once
        - hour
        - day
        - week
        - month
        - quarter
        - year
        - constant
    ContractStatus:
      type: string
      description: >-
        Status of the contract:

        * Active - Contract is active

        * Pending - Contract is not active

        * Scheduled - Contract is scheduled to activate in the future

        * Canceled - Contract has been canceled

        * Moved - User upgraded from this contract to a different one

        * NotReady - Contract was created, but billing engine has not completed
        contract setup
      enum:
        - active
        - pending
        - scheduled
        - canceled
        - moved
        - not_ready
    Strategy:
      type: string
      description: >-
        Pricing strategy of the Plan:

        * Plan - Plan itself contains a price, and it will be used.

        * Feature - Each feature in the plan is configured with a price, and
        final price of the plan

        is the combination of prices of all its features
      enum:
        - plan
        - group
        - feature
    Period:
      type: object
      description: >-
        Billing period of the contract. For example, for contracts that are paid
        monthly,

        a new billing period would be created each month. For Constant or Once
        contracts, a single

        period would be created with empty "end" value
      required:
        - start
        - end
      properties:
        end:
          type: string
          format: date-time
          description: End of the billing period
        start:
          type: string
          format: date-time
          description: Start of the billing period
    DueDatePolicy:
      type: string
      description: >-
        Determines when the due_date of the invoices should be set when created:

        * StartOfPeriod - invoices are due at the beginning of the billing
        period

        * EndOfPeriod - invoices are due at the end of the billing period
      enum:
        - start_of_period
        - end_of_period
    InvoiceTrigger:
      oneOf:
        - type: string
          description: invoices are created as soon as invoice items are validated
          enum:
            - immediate
        - type: object
          required:
            - periodic
          properties:
            periodic:
              $ref: '#/components/schemas/UnboundedPeriodRule'
        - type: string
          description: invoices are created on wb_customer action
          enum:
            - manual
      description: |-
        When the invoices should be created

        Note: EveryCycle and Periodic aren't yet supported,
        they will behave as Manual
    UsagePeriodClosingPolicy:
      type: string
      description: >-
        Determines how usage period should be closed:

        * Automatic - usage period will be closed as soon as claim period ends

        * Manual -  usage period will be open until closed manually

        * Delayed - automatic with delay after the claim period ends. Valid
        delays are 15 minutes, 1 hour, 1 day
      enum:
        - automatic
        - manual
        - 15 minutes
        - 1 hour
        - 1 day
    CustomCycleCharges:
      type: object
      description: Charges for features on a custom cycle
      required:
        - periodic_daily
        - periodic_weekly
        - periodic_monthly
        - periodic_quarterly
        - periodic_yearly
      properties:
        periodic_daily:
          $ref: '#/components/schemas/Estimate'
        periodic_monthly:
          $ref: '#/components/schemas/Estimate'
        periodic_quarterly:
          $ref: '#/components/schemas/Estimate'
        periodic_weekly:
          $ref: '#/components/schemas/Estimate'
        periodic_yearly:
          $ref: '#/components/schemas/Estimate'
    Estimate:
      type: object
      description: Detailed breakdown of the estimated charges
      required:
        - cycle_start_charges
        - minimum_usage
        - extra_cycle_end_charges
      properties:
        cycle_start_charges:
          type: string
          description: Amount to be charged at the start of the given cycle
        extra_cycle_end_charges:
          type: string
          description: Amount to be charged at the end of the cycle (except usage)
        minimum_usage:
          type: string
          description: Minimum amount of usage that will be charged
    UnboundedPeriodRule:
      type: object
      description: |-
        How period are generated, independently from a start
        or end
      required:
        - cycle_count
        - cycle
      properties:
        cycle:
          $ref: '#/components/schemas/TriggerCycle'
        cycle_count:
          type: integer
          description: the number of days/week/month etc. in a period
          minimum: 0
        cycle_start_offset:
          type: integer
          description: |-
            Number of full days between the cycle's natural start and
            the claims starts. For example if claims are to start on
            the morning of the 14 each month, the offset will be 13.
            This value can be null, meaning either that it's not
            specified at this level (eg in preferences) or that it's
            0 (ie a natural cycle)
          nullable: true
          minimum: 0
    TriggerCycle:
      type: string
      description: |-
        Enum that lists supported trigger cycles for periodic triggers:
        * Month - every month
        * Quarter - every quarter
        * Year - every year
      enum:
        - day
        - week
        - month
        - quarter
        - year
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: wb-key
    wb_user_cookie:
      type: apiKey
      in: cookie
      name: app-session

````