Skip to main content

RetailCRM API client

Project description

Build Status Coverage PyPI PyPI - Python Version

RetailCRM python API client

This is Python RetailCRM API client. This library allows to use all available API versions.

Install

pip3 install retailcrm

Usage

API version 3 order create

# coding utf-8

import retailcrm


client = retailcrm.v3('https://demo.retailcrm.pro', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc')

order = {
  'firstName': 'John',
  'lastName': 'Doe',
  'phone': '+79000000000',
  'email': 'john@example.com',
  'orderMethod': 'call-request',
}

result = client.order_create(order)

API version 4 customers history

# coding utf-8

import retailcrm


client = retailcrm.v4('https://demo.retailcrm.pro', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc')

result = client.customers_history(filters={'sinceId': '1500', 'startDate': '2018-03-01'})

print(result['pagination']['totalCount'])

API version 5 task create

# coding utf-8

import retailcrm


client = retailcrm.v5('https://demo.retailcrm.pro', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc')
site = 'example-com'
task = {
  'text': 'Product availability problem',
  'commentary': 'Take a look ASAP',
  'order': {
    'externalId': '100500'
  },
  'performerId': 1
}

result = client.task_create(task, site)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

retailcrm-5.2.1.tar.gz (35.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

retailcrm-5.2.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file retailcrm-5.2.1.tar.gz.

File metadata

  • Download URL: retailcrm-5.2.1.tar.gz
  • Upload date:
  • Size: 35.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for retailcrm-5.2.1.tar.gz
Algorithm Hash digest
SHA256 aa7f9ab751b5211f09fed4fa64aea30e0f3aecf2f7b3e99520d693a112fd6a05
MD5 ce60d793cddb0eb095470a433b2e33ab
BLAKE2b-256 f063c056ea2785cae5dd6d8ecb61ba1e0efec39799154b3ddd1ca0a339c2116f

See more details on using hashes here.

File details

Details for the file retailcrm-5.2.1-py3-none-any.whl.

File metadata

  • Download URL: retailcrm-5.2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for retailcrm-5.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 943df443b9ec04f69fbf7545e722c4cc4b75551de4a888cebf209f3a81c0569e
MD5 a93e84d40bef0737a62a11dfbfe7ecaf
BLAKE2b-256 1035d72ea89df09bca67f66f6f2f8e6df742b77dbaec3855573f9c47945f91ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page